Author Topic: New devel/codeblocks-devel port for FreeBSD  (Read 8982 times)

Deuce

  • Guest
New devel/codeblocks-devel port for FreeBSD
« on: June 12, 2007, 05:48:39 am »
Well, I just submitted a new port to FreeBSD... you can get the jump on it here: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/113608

Basically, the PORTREVISION in the Makefile is the SVN revision which is fetched, built, and installed.

I'll be submitting an update any time I see a fix I actually care about, not every day or anything... however, since the SVN version is the PORTREVISION, you can always diddle that yourself (and update the pkg-plist if there are new files installed)

Anyways, the FreeBSD build instructions just got a whole lot easier.

stefanos_

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #1 on: June 21, 2007, 09:20:10 pm »
Hello Deuce,

My name is Stefanos and I would like your help a little bit. I have been using Nightly builds under Windows for a time and I found code::blocks really amazing IDE. Also, because of its usage I have managed to make a portable version for my college exercises (they use Dev C++ 4 which is built with Delphi as you surely already know.)

I have been trying to create this .sh file you were mentioning on the above link you mentioned and still I cannot make it work.

Can you please help me a little bit? I would really appreciated it if you could because I do not want to depend on Windows environment to use Free Software.  It seems though that they are actually in a better condition under Windows than in other OS(es).

I would like to use code::blocks most of my time under FreeBSD and not under XP.

Waiting for your reply.

Best Regards,

Stefanos

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #2 on: June 21, 2007, 09:54:52 pm »
Stefane, you should post any errors you 're getting.
Be patient!
This bug will be fixed soon...

stefanos_

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #3 on: June 21, 2007, 10:08:05 pm »
Kyrie Yanni,

How are you? :)

Yes you are absolutely right. Next time I should. Here is the procedure I have followed to create the devel/codeblocks-devel:

First of all I copied the script code in a file named codeblocks.sh

I changed its permissions to 777 so shall I won't meet any error message.

I ran it like this root #sh cobeblocks.sh and the output was this:
c - devel/codeblocks-devel
x - devel/codeblocks-devel/Makefile
x - devel/codeblocks-devel/distinfo
x - devel/codeblocks-devel/pkg-descr
x - devel/codeblocks-devel/pkg-plist

To double check it I went to /usr/ports/devel and I found out that only /usr/ports/devel/codeblocks exists...I am sure that I have done something wrong therefore I need help. This is the first time I run a patch or what it's name is...

Waiting for your reply.

Stefanos

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #4 on: June 21, 2007, 10:25:46 pm »
Quote
Waiting for your reply.

Well, you 'll be waiting for a long time then :).
I am sorry but I have no experience with *BSD whatsoever so my help would be inadequate.

I said you should post your errors just because if someone can help you, he will need all the info you can give.
Be patient!
This bug will be fixed soon...

Turrican

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #5 on: July 16, 2007, 02:12:34 pm »
Same results for me. I may spend an evening on this.

moesasji

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #6 on: September 02, 2007, 10:37:43 am »
I'm not sure the people above are still waiting for answers, but a response could be useful for future reference.

Basically Deuce has posted a shell script that creates a port-directory for code::blocks in the current directory. I've updated it for myself to SVN version 4418 and made some changes to the original script of Deuce as the SVN-stuff refused to work here (I'm new to FreeBSD, so probably my fault). I've not yet had time to test code-blocks itself, but it seems to work fine.

The updated script can be found here

How to install:
1) Go to the directory you use to store locally created ports, for example: /usr/local/ports (create if you don't have it)
2) Save the script in this directory.
3) Make the script executable by: chmod +x <name of the script-file>
4) Execute the script.....it will create the directory-structure for the port: ./<script-name>
5) move to the created directory: cd ./devel/codeblocks-devel
6) Retrieve the SVN-version and make the distfile with the command: make distfile
7) Now install in the usual fashion by typing: make install

You can update to later SVN versions by changing the portrevision variable in the makefile. However, as I understand it, FreeBSD uses the content of pkg-plist to determine what to remove when deinstalling. As such the content of this file would have to be updated if you change to later SVN-versions, see the porters handbook for more details if you are interested. Note that for the original script posted by Deuce step 6 would not be needed....I think.

Disclaimer) as far as I can tell the port install and deinstalls cleanly with all options except debug selected, but no guarantees. How it works with less options selected has not been tested....


stefanos_

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #7 on: November 02, 2007, 01:18:34 am »
hey moesasji can you please post again because the script has been removed?


thank you

stefanos

moesasji

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #8 on: November 02, 2007, 08:09:49 am »
hey moesasji can you please post again because the script has been removed?

Hi Stefanos_

Unfortunately I decided after a couple of weeks playing with FreeBSD that it has too many disadvantages (for me) compared to Gentoo. As a result I reinstalled Gentoo nuking the FreeBSD install in the process. In the process the script I posted here unfortunately got lost.

However you can use the original script posted by Deuce to get it to work. You have to follow the first 5 steps I posted above for the script of Deuce. Note that directory structure for the port of codeblocks is created relative to the directory in which the script resides!! So don't go looking in the /ports directory for it. The only thing the script does is recreate the directory of the port that Deuce had on his PC.

Note that if it doesn't work directly then first retrieve the codeblocks source via SVN. The command is:

Code
svn checkout -r 4084 svn://svn.berlios.de/codeblocks/trunk 

Pack it in to an archive file and move that archive over the your distfile directory. I don't remember the exact name, but typing make install in the created codeblocks directory will tell you which file it is missing. That's the name the archive should have.

BTW) I would suggest using a newer SVN version...so update the number 4084 in the makefile and in the above SVN command. Note that if you update to a new SVN-version you have to update the list of installed file in the make-file. That's one of the reasons I could not get used to FreeBSD. It was my impression that Gentoo does manage to improve some of the deficiencies in FreeBSD.....losing some of the strong points in the process.
« Last Edit: November 02, 2007, 08:12:16 am by moesasji »

stefanos_

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #9 on: November 02, 2007, 08:59:42 am »
moesasji thank you for your reply.

I will do my best to install it and if I can I will do that with the latest nightly build.

I wish you all the best with Gentoo.

Regards,

Stefanos

moesasji

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #10 on: November 02, 2007, 10:32:16 am »
Just let me know of any errors or difficulties you experience.
I might still be able to help you get it up and running....
In the end I've played enough with FreeBSD to understand how it installs things.

stefanos_

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #11 on: November 07, 2007, 12:26:52 am »
moesasji I would like your help man. I ran the command you gave me and I now have the trunk folder. How to pack it? I don't know how to do it. When you have time can you please help me?

Regards

Stefanos_

P.S: By showing the way be sure that I will share it everywhere on the internet :) Lots of guys like me need this.

moesasji

  • Guest
Re: New devel/codeblocks-devel port for FreeBSD
« Reply #12 on: November 11, 2007, 03:05:28 pm »
I'm sorry for the delay as I didn't notice the reply....these alert-mails don't go to my normal email-address.

You need to pack the directory with the files retrieved via SVN into a tarball. If I'm correct the command is as follows:

Code
tar -pczf name_of_your_archive.tar.gz /path/to/directory

The name that the archive should have you can determine by running a make install in the created ports-directory (the one that is created by the shell-script)

Once you've created the archive.....move it over to the distfiles directory for FreeBSD. Probably /usr/ports/distfiles (or where-ever you've put your ports-tree). Then run make install again and it should install the checked-out version.