Re: building a port with very long list of build options

2011-04-24 Thread Carl

On 2011-04-22 4:13 AM, Manolis Kiagias wrote:

On 04/22/2011 10:33 AM, Manolis Kiagias wrote:

On 04/22/2011 10:08 AM, Carl wrote:

This form will override the Makefile present in the current directory
and will use the specified make file with name your_own_make_file_name .

make -f your_own_make_file_name

Yes, I did see that, but I interpreted that to mean my make file
*replaces* the original, in which case I would need to populate my
make file not only with the list of build options I want but also a
copy of everything in the original make file. If I'm correct, that
doesn't seem to me to be a good idea from a maintenance perspective. I
was hoping for something like the -f option that somehow inserted
rather than replaced.

Carl / K0802647

Assuming you have already selected some options during make config, you
could try adding your own to the file /var/db/ports/portname/options
___


A probably more elegant way is to use the ports-mgmt/portconf port.
This allows per port settings to be applied, which are honored by make,
portupgrade and the other tools. Just install and use
/usr/local/etc/ports.conf to add your options:

  Here is the sample supplied with the portconf:

editors/openoffice.org-2: WITH_CCACHE|LOCALIZED_LANG=it
print/ghostscript-* print/lpr-wrapper: A4
sysutils/fusefs-kmod*: !KERNCONF | !NOPORTDOCS
www/firefox-i18n: WITHOUT_SWITCHER | FIREFOX_I18N=fr it
x11/fakeport: CONFIGURE_ARGS=--with-modules=aaa bbb ccc


ports-mgmt/portconf certainly does look to be a very appealing solution 
in general, but am I wrong in thinking that it provides me with no way 
to address my original problem? How do I use it when I've got an 
exceptionally long list of options for a particular port?


As for manually customizing /var/db/ports/portname/options, the port 
builds in question are done in a clean chroot using a batch process, so 
make config doesn't happen and /var/db/ports/portname/options never 
exists.


Carl / K0802647
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-24 Thread Chris Rees
On 24 Apr 2011 09:29, Carl k0802...@telus.net wrote:

 On 2011-04-22 4:13 AM, Manolis Kiagias wrote:

 On 04/22/2011 10:33 AM, Manolis Kiagias wrote:

 On 04/22/2011 10:08 AM, Carl wrote:

 This form will override the Makefile present in the current directory
 and will use the specified make file with name your_own_make_file_name
.

 make -f your_own_make_file_name

 Yes, I did see that, but I interpreted that to mean my make file
 *replaces* the original, in which case I would need to populate my
 make file not only with the list of build options I want but also a
 copy of everything in the original make file. If I'm correct, that
 doesn't seem to me to be a good idea from a maintenance perspective. I
 was hoping for something like the -f option that somehow inserted
 rather than replaced.

 Carl / K0802647

 Assuming you have already selected some options during make config, you
 could try adding your own to the file /var/db/ports/portname/options
 ___


 A probably more elegant way is to use the ports-mgmt/portconf port.
 This allows per port settings to be applied, which are honored by make,
 portupgrade and the other tools. Just install and use
 /usr/local/etc/ports.conf to add your options:

  Here is the sample supplied with the portconf:

 editors/openoffice.org-2: WITH_CCACHE|LOCALIZED_LANG=it
 print/ghostscript-* print/lpr-wrapper: A4
 sysutils/fusefs-kmod*: !KERNCONF | !NOPORTDOCS
 www/firefox-i18n: WITHOUT_SWITCHER | FIREFOX_I18N=fr it
 x11/fakeport: CONFIGURE_ARGS=--with-modules=aaa bbb ccc


 ports-mgmt/portconf certainly does look to be a very appealing solution in
general, but am I wrong in thinking that it provides me with no way to
address my original problem? How do I use it when I've got an exceptionally
long list of options for a particular port?

 As for manually customizing /var/db/ports/portname/options, the port
builds in question are done in a clean chroot using a batch process, so
make config doesn't happen and /var/db/ports/portname/options never
exists.


How about my earlier suggestion of populating a 'makefile' no capitals with
the appropriate WITH and WITHOUT flags defined, then .include-ing the
original Makefile?

Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-24 Thread Manolis Kiagias
On 04/24/2011 11:26 AM, Carl wrote:
 On 2011-04-22 4:13 AM, Manolis Kiagias wrote:
 On 04/22/2011 10:33 AM, Manolis Kiagias wrote:
 On 04/22/2011 10:08 AM, Carl wrote:
 This form will override the Makefile present in the current directory
 and will use the specified make file with name
 your_own_make_file_name .
 make -f your_own_make_file_name

 Yes, I did see that, but I interpreted that to mean my make file
 *replaces* the original, in which case I would need to populate my
 make file not only with the list of build options I want but also a
 copy of everything in the original make file. If I'm correct, that
 doesn't seem to me to be a good idea from a maintenance perspective. I
 was hoping for something like the -f option that somehow inserted
 rather than replaced.

 Carl / K0802647
 Assuming you have already selected some options during make config, you
 could try adding your own to the file /var/db/ports/portname/options
 ___

 A probably more elegant way is to use the ports-mgmt/portconf port.
 This allows per port settings to be applied, which are honored by make,
 portupgrade and the other tools. Just install and use
 /usr/local/etc/ports.conf to add your options:

   Here is the sample supplied with the portconf:

 editors/openoffice.org-2: WITH_CCACHE|LOCALIZED_LANG=it
 print/ghostscript-* print/lpr-wrapper: A4
 sysutils/fusefs-kmod*: !KERNCONF | !NOPORTDOCS
 www/firefox-i18n: WITHOUT_SWITCHER | FIREFOX_I18N=fr it
 x11/fakeport: CONFIGURE_ARGS=--with-modules=aaa bbb ccc

 ports-mgmt/portconf certainly does look to be a very appealing
 solution in general, but am I wrong in thinking that it provides me
 with no way to address my original problem? How do I use it when I've
 got an exceptionally long list of options for a particular port?


You list all the options on the relevant ports.conf line, separated by
'|' as shown in the example. I don't think there is any practical limit
to this though admittedly I've only used it for the occasional option.

 As for manually customizing /var/db/ports/portname/options, the port
 builds in question are done in a clean chroot using a batch process,
 so make config doesn't happen and /var/db/ports/portname/options
 never exists.

 Carl / K0802647

You could create it manually from scratch and list all your options in
there.  It is just simpler if the file already exists and just needs
some more entries.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-24 Thread Warren Block

On Sun, 24 Apr 2011, Carl wrote:


As for manually customizing /var/db/ports/portname/options, the port builds 
in question are done in a clean chroot using a batch process, so make 
config doesn't happen and /var/db/ports/portname/options never exists.


Why not just

make `cat options.txt`

Where options.txt is

NOPORTDOCS=yes
NOPORTEXAMPLES=yes
...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-22 Thread Carl

On 2011-04-21 8:52 PM, Polytropon wrote:

This has been possible and common in the past. For example,
the many options for the mplayer and mencoder ports could
be specified in a file, so changing of a port's file was
not needed. I'm not fully sure this option is still present,
but at least on v7 it worked.

Create a file Makefile.local in the port's directory and
specify all your options as desired. This file will be
sourced when you issue a make command and will override
settings of the regular Makefile (e. g. if you want
different CFLAGS for _this_ port). The file is to be in
the known syntax, NAME=value.


Does that solution allow for locating Makefile.local outside the ports 
tree so as not to contaminate builds for other targets using the same 
ports tree?


On 2011-04-21 9:11 PM, Mehmet Erol Sanliturk wrote:

If you read the make manual page , you will see the following option :

   ...

  *-f* *makefile*
 Specify a makefile to read instead of the default one.

  ...

  which is used as

make -f your_own_make_file_name

This form will override the Makefile present in the current directory
and will use the specified make file with name your_own_make_file_name .


Yes, I did see that, but I interpreted that to mean my make file 
*replaces* the original, in which case I would need to populate my make 
file not only with the list of build options I want but also a copy of 
everything in the original make file. If I'm correct, that doesn't seem 
to me to be a good idea from a maintenance perspective. I was hoping for 
something like the -f option that somehow inserted rather than replaced.


Carl / K0802647
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-22 Thread Manolis Kiagias
On 04/22/2011 10:08 AM, Carl wrote:


 This form will override the Makefile present in the current directory
 and will use the specified make file with name your_own_make_file_name .
 make -f your_own_make_file_name

 Yes, I did see that, but I interpreted that to mean my make file
 *replaces* the original, in which case I would need to populate my
 make file not only with the list of build options I want but also a
 copy of everything in the original make file. If I'm correct, that
 doesn't seem to me to be a good idea from a maintenance perspective. I
 was hoping for something like the -f option that somehow inserted
 rather than replaced.

 Carl / K0802647

Assuming you have already selected some options during make config, you
could try adding your own to the file /var/db/ports/portname/options
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-22 Thread Chris Rees
On 22 April 2011 08:08, Carl k0802...@telus.net wrote:
 On 2011-04-21 8:52 PM, Polytropon wrote:

 This has been possible and common in the past. For example,
 the many options for the mplayer and mencoder ports could
 be specified in a file, so changing of a port's file was
 not needed. I'm not fully sure this option is still present,
 but at least on v7 it worked.

 Create a file Makefile.local in the port's directory and
 specify all your options as desired. This file will be
 sourced when you issue a make command and will override
 settings of the regular Makefile (e. g. if you want
 different CFLAGS for _this_ port). The file is to be in
 the known syntax, NAME=value.

 Does that solution allow for locating Makefile.local outside the ports tree
 so as not to contaminate builds for other targets using the same ports tree?

 On 2011-04-21 9:11 PM, Mehmet Erol Sanliturk wrote:

 If you read the make manual page , you will see the following option :

               ...

      *-f* *makefile*
             Specify a makefile to read instead of the default one.

              ...

  which is used as

 make -f your_own_make_file_name

 This form will override the Makefile present in the current directory
 and will use the specified make file with name your_own_make_file_name .

 Yes, I did see that, but I interpreted that to mean my make file *replaces*
 the original, in which case I would need to populate my make file not only
 with the list of build options I want but also a copy of everything in the
 original make file. If I'm correct, that doesn't seem to me to be a good
 idea from a maintenance perspective. I was hoping for something like the -f
 option that somehow inserted rather than replaced.


Or, at the bottom of your Makefile defining variables (including
BATCH= yes to skip the OPTIONS dialog), stick the line:

.include Makefile

and use make -f _my_Makefile

Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-22 Thread Mehmet Erol Sanliturk
On Fri, Apr 22, 2011 at 3:08 AM, Carl k0802...@telus.net wrote:

 On 2011-04-21 8:52 PM, Polytropon wrote:

 This has been possible and common in the past. For example,
 the many options for the mplayer and mencoder ports could
 be specified in a file, so changing of a port's file was
 not needed. I'm not fully sure this option is still present,
 but at least on v7 it worked.

 Create a file Makefile.local in the port's directory and
 specify all your options as desired. This file will be
 sourced when you issue a make command and will override
 settings of the regular Makefile (e. g. if you want
 different CFLAGS for _this_ port). The file is to be in
 the known syntax, NAME=value.


 Does that solution allow for locating Makefile.local outside the ports tree
 so as not to contaminate builds for other targets using the same ports tree?

 On 2011-04-21 9:11 PM, Mehmet Erol Sanliturk wrote:

 If you read the make manual page , you will see the following option :

   ...

  *-f* *makefile*
 Specify a makefile to read instead of the default one.

  ...

  which is used as

 make -f your_own_make_file_name

 This form will override the Makefile present in the current directory
 and will use the specified make file with name your_own_make_file_name .


 Yes, I did see that, but I interpreted that to mean my make file *replaces*
 the original, in which case I would need to populate my make file not only
 with the list of build options I want but also a copy of everything in the
 original make file. If I'm correct, that doesn't seem to me to be a good
 idea from a maintenance perspective. I was hoping for something like the -f
 option that somehow inserted rather than replaced.

 Carl / K0802647





Please study make manual page in detail . There are many more commands to be
applicable ,
for example  ( .include ) which you may use to include the original make
file name Makefile at any suitable point in your own make file .


Also studying the currently used Makefile files in FreeBSD may give many
ideas to apply .

Thank you very much .


Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-22 Thread Manolis Kiagias
On 04/22/2011 10:33 AM, Manolis Kiagias wrote:
 On 04/22/2011 10:08 AM, Carl wrote:
 This form will override the Makefile present in the current directory
 and will use the specified make file with name your_own_make_file_name .
 make -f your_own_make_file_name

 Yes, I did see that, but I interpreted that to mean my make file
 *replaces* the original, in which case I would need to populate my
 make file not only with the list of build options I want but also a
 copy of everything in the original make file. If I'm correct, that
 doesn't seem to me to be a good idea from a maintenance perspective. I
 was hoping for something like the -f option that somehow inserted
 rather than replaced.

 Carl / K0802647
 Assuming you have already selected some options during make config, you
 could try adding your own to the file /var/db/ports/portname/options
 ___

A probably more elegant way is to use the ports-mgmt/portconf port. 
This allows per port settings to be applied, which are honored by make,
portupgrade and the other tools. Just install and use
/usr/local/etc/ports.conf to add your options:

 Here is the sample supplied with the portconf:

editors/openoffice.org-2: WITH_CCACHE|LOCALIZED_LANG=it
print/ghostscript-* print/lpr-wrapper: A4
sysutils/fusefs-kmod*: !KERNCONF | !NOPORTDOCS
www/firefox-i18n: WITHOUT_SWITCHER | FIREFOX_I18N=fr it
x11/fakeport: CONFIGURE_ARGS=--with-modules=aaa bbb ccc

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-22 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Thu Apr 21 22:45:24 2011
 Date: Thu, 21 Apr 2011 20:17:31 -0700
 From: Carl k0802...@telus.net
 To: freebsd-questions@freebsd.org
 Subject: building a port with very long list of build options

 Let's say I want to build a port for which I need to specify a huge 
 number of build options (eg. ghostscript). In my case I am 
 cross-compiling on an amd64 host for what will be a NanoBSD i386 target, 
 but I don't think that's important here. The scenario precludes using 
 the familiar configuration menu. The problem is that the desired list of 
 options far exceeds what would be sane to specify on the 'make' command 
 line. In fact, it apparently even exceeds what typical text editors 
 tolerate when trying to enter the line in a shell script. What is the 
 recommended solution?

One *can* use a script with an 'insanely long' set of options, by the
sinple expedient of using  \  to continue the list on the next line.

In fact, when I make a script-file for building something with lots
of options, I usually, fore 'readability'  put each option on a separate 
line.  e.g.:

./Configure \
 --option_001 \
 --option_002 \
 --option_003 \
 --option_003 \
 ...
 ...
 --option_203 \

making _sure_ there is a blank line after the last option specification.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


building a port with very long list of build options

2011-04-21 Thread Carl
Let's say I want to build a port for which I need to specify a huge 
number of build options (eg. ghostscript). In my case I am 
cross-compiling on an amd64 host for what will be a NanoBSD i386 target, 
but I don't think that's important here. The scenario precludes using 
the familiar configuration menu. The problem is that the desired list of 
options far exceeds what would be sane to specify on the 'make' command 
line. In fact, it apparently even exceeds what typical text editors 
tolerate when trying to enter the line in a shell script. What is the 
recommended solution?


Given that I do not want to customize the port's Makefile, I was hoping 
'make' would support a command line option that would let me simply 
point to a separate file containing the list of variables to add, one 
per line. It's not apparent to me that that exists.


Carl / K0802647

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-21 Thread Polytropon
On Thu, 21 Apr 2011 20:17:31 -0700, Carl k0802...@telus.net wrote:
 Given that I do not want to customize the port's Makefile, I was hoping 
 'make' would support a command line option that would let me simply 
 point to a separate file containing the list of variables to add, one 
 per line. It's not apparent to me that that exists.

This has been possible and common in the past. For example,
the many options for the mplayer and mencoder ports could
be specified in a file, so changing of a port's file was
not needed. I'm not fully sure this option is still present,
but at least on v7 it worked.

Create a file Makefile.local in the port's directory and
specify all your options as desired. This file will be
sourced when you issue a make command and will override
settings of the regular Makefile (e. g. if you want
different CFLAGS for _this_ port). The file is to be in
the known syntax, NAME=value.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: building a port with very long list of build options

2011-04-21 Thread Mehmet Erol Sanliturk
On Thu, Apr 21, 2011 at 11:17 PM, Carl k0802...@telus.net wrote:

 Let's say I want to build a port for which I need to specify a huge number
 of build options (eg. ghostscript). In my case I am cross-compiling on an
 amd64 host for what will be a NanoBSD i386 target, but I don't think that's
 important here. The scenario precludes using the familiar configuration
 menu. The problem is that the desired list of options far exceeds what would
 be sane to specify on the 'make' command line. In fact, it apparently even
 exceeds what typical text editors tolerate when trying to enter the line in
 a shell script. What is the recommended solution?

 Given that I do not want to customize the port's Makefile, I was hoping
 'make' would support a command line option that would let me simply point to
 a separate file containing the list of variables to add, one per line. It's
 not apparent to me that that exists.

 Carl / K0802647





If you read the make manual page , you will see the following option :


  ...

 *-f* *makefile*
 Specify a makefile to read instead of the default one.

 ...


 which is used as

make -f your_own_make_file_name


This form will override the Makefile present in the current directory

and will use the specified make file with name your_own_make_file_name .


Thank you very much .

Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org