Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-08-01 04:08:52 -0400 (Wed, 01 Aug 2012)
New Revision: 977
Added:
trunk/BSDBuild/winsock.pm
Log:
emul() for winsock1 and winsock2
Added: trunk/BSDBuild/winsock.pm
... [More]
===================================================================
--- trunk/BSDBuild/winsock.pm (rev 0)
+++ trunk/BSDBuild/winsock.pm2012-08-01 08:08:52 UTC (rev 977)
< at >< at > -0,0 +1,59 < at >< at >
+# vim:ts=4
+#
+# Copyright (c) 2012 Hypertriton, Inc. <http://hypertriton.com/>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution..
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
+
+sub Link
+{
+my $lib = shift;
+
+if ($lib eq 'winsock' ||
+ $lib eq 'ws2_32' ||
+$lib eq 'iphlpapi') {
+return (1);
+}
+return (0);
+}
+
+sub Emul
+{
+my ($os, $osrel, $machine) = < at >_;
+
+if ($os =~ /windows-(xp|vista|7)/) {
+MkEmulWindows('WINSOCK1', 'wsock32');
+MkEmulWindows('WINSOCK2', 'ws2_32 iphlpapi');
+} elsif ($os =~ /^windows/) {
+MkEmulWindows('WINSOCK1', 'wsock32');
+MkEmulUnavail('WINSOCK2');
+}
+return (1);
+}
+
+BEGIN
+{
+$DESCR{'winsock'} = 'the WinSock interface';
+$EMUL{'winsock'} = \&Emul;
+$LINK{'winsock'} = \&Link;
+}
+
+;1
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-08-01 03:51:00 -0400 (Wed, 01 Aug 2012)
New Revision: 975
Modified:
trunk/uman.pl
Log:
dots are allowed in manpage names
Modified: trunk/uman.pl
===================================================================
---
... [More]
trunk/uman.pl2012-07-29 13:43:32 UTC (rev 974)
+++ trunk/uman.pl2012-08-01 07:51:00 UTC (rev 975)
< at >< at > -2,9 +2,12 < at >< at >
#
# Public domain
#
-# uman.pl: Search source directories for an uninstalled manual page.
-# The script also looks up BSDBuild-generated .manlinks.mk files.
+# Search $UMANPATH for a user-installed manual page and write it to
+# the standard output (via groff).
#
+# Links can also be specified (uman will search BSDBuild-generated
+# .manlinks.mk files for them).
+#
if (!defined($ENV{'UMANPATH'})) {
print "The \$UMANPATH environment variable is not set; see uman(1).\n";
< at >< at > -18,7 +21,7 < at >< at >
#$NROFF = 'nroff -Tascii -mandoc';
$NROFF = 'groff -S -P-h -Wall -mtty-char -man -Tascii -P-c -mandoc';
-if (< at >ARGV < 1) { die "Usage: aman [manpage]"; }
+if (< at >ARGV < 1) { die "Usage: uman [manpage]"; }
my $query = $ARGV[0];
my $pager = 'less';
if (exists($ENV{'PAGER'})) { $pager = $ENV{'PAGER'}; }
< at >< at > -73,7 +76,7 < at >< at >
next;
}
if ($ent =~ /^\./) { next; }
-if ($ent =~ /^([\w\-]+)\.(\d)$/) {
+if ($ent =~ /^([\w\-\.]+)\.(\d)$/) {
if ($q eq lc($1) ||
$q eq lc($1.'.'.$2)) {
ReadPage($path);
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-07-29 03:30:02 -0400 (Sun, 29 Jul 2012)
New Revision: 973
Added:
trunk/BSDBuild/crypt.pm
Modified:
trunk/BSDBuild/Makefile
trunk/mkconfigure.pl
Log:
test for crypt() routine
Modified: trunk/BSDBuild/Makefile
... [More]
===================================================================
--- trunk/BSDBuild/Makefile2012-07-27 14:09:37 UTC (rev 972)
+++ trunk/BSDBuild/Makefile2012-07-29 07:30:02 UTC (rev 973)
< at >< at > -108,7 +108,8 < at >< at >
portaudio.pm \
mysql.pm \
cocoa.pm \
-sockopts.pm
+sockopts.pm \
+crypt.pm
all:
Added: trunk/BSDBuild/crypt.pm
===================================================================
--- trunk/BSDBuild/crypt.pm (rev 0)
+++ trunk/BSDBuild/crypt.pm2012-07-29 07:30:02 UTC (rev 973)
< at >< at > -0,0 +1,87 < at >< at >
+# vim:ts=4
+#
+# Copyright (c) 2012 Hypertriton, Inc. <http://hypertriton.com/>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution..
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+# USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..
+
+my $testCode = << 'EOF';
+#include <unistd.h>
+
+int
+main(int argc, char *argv[])
+{
+char *key = "some key", *salt = "sa";
+char *enc;
+
+if ((enc = crypt(key, salt)) != NULL) {
+return (1);
+}
+return (0);
+}
+EOF
+
+sub Test
+{
+MkDefine('CRYPT_CFLAGS', '');
+MkDefine('CRYPT_LIBS', '');
+
+TryCompileFlagsC('HAVE_CRYPT', '-lcrypt', $testCode);
+MkIfTrue('${HAVE_CRYPT}');
+MkDefine('CRYPT_CFLAGS', '');
+MkDefine('CRYPT_LIBS', '-lcrypt');
+MkElse;
+MkPrintN('checking for crypt() in libc...');
+TryCompileFlagsC('HAVE_CRYPT', '', $testCode);
+MkIfTrue('${HAVE_CRYPT}');
+MkDefine('CRYPT_CFLAGS', '');
+MkDefine('CRYPT_LIBS', '');
+MkEndif;
+MkEndif;
+
+MkSave('CRYPT_CFLAGS', 'CRYPT_LIBS');
+}
+
+sub Emul
+{
+my ($os, $osrel, $machine) = < at >_;
+
+if ($os eq 'linux' || $os eq 'darwin' || $os =~ /^(open|net|free)bsd$/) {
+MkDefine('HAVE_CRYPT', 'yes');
+MkSaveDefine('HAVE_CRYPT');
+} else {
+MkSaveUndef('HAVE_CRYPT');
+}
+MkDefine('CRYPT_CFLAGS', '');
+MkDefine('CRYPT_LIBS', '');
+MkSave('CRYPT_CFLAGS', 'CRYPT_LIBS');
+return (1);
+}
+
+BEGIN
+{
+$DESCR{'crypt'} = 'the crypt() routine (in -lcrypt)';
+$TESTS{'crypt'} = \&Test;
+$EMUL{'crypt'} = \&Emul;
+$DEPS{'crypt'} = 'cc';
+}
+
+;1
Modified: trunk/mkconfigure.pl
===================================================================
--- trunk/mkconfigure.pl2012-07-27 14:09:37 UTC (rev 972)
+++ trunk/mkconfigure.pl2012-07-29 07:30:02 UTC (rev 973)
< at >< at > -731,7 +731,7 < at >< at >
'--srcdir=p' =>'Source directory for concurrent build',
'--build=s' =>'Host environment for build',
'--host=s' =>'Cross-compile for target environment',
-'--byte-order=s' =>'Byte order for target environment (LE|BE)',
+'--byte-order=s' =>'Byte order for build (LE|BE)',
'--prefix=p' =>'Installation base',
'--exec-prefix=p' =>'Machine-dependent installation base',
'--bindir=p' =>'Executables for common users',
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-07-27 10:09:37 -0400 (Fri, 27 Jul 2012)
New Revision: 972
Modified:
trunk/build.common.mk
trunk/man/build.common.mk.5
trunk/mkconfigure.pl
Log:
add --moduledir setting
Modified: trunk/build.common.mk
... [More]
===================================================================
--- trunk/build.common.mk2012-07-27 05:04:26 UTC (rev 971)
+++ trunk/build.common.mk2012-07-27 14:09:37 UTC (rev 972)
< at >< at > -33,6 +33,7 < at >< at >
DATADIR?=${PREFIX}/share
BINDIR?=${PREFIX}/bin
LIBDIR?=${PREFIX}/lib
+MODULEDIR?=${PREFIX}/lib
INCLDIR?=${PREFIX}/include
MANDIR?=${PREFIX}/man
Modified: trunk/man/build.common.mk.5
===================================================================
--- trunk/man/build.common.mk.52012-07-27 05:04:26 UTC (rev 971)
+++ trunk/man/build.common.mk.52012-07-27 14:09:37 UTC (rev 972)
< at >< at > -75,6 +75,12 < at >< at >
Installation directory for library files.
Defaults to
.Sq PREFIX/lib .
+.It Ev MODULEDIR
+Installation directory for dynamically-loaded modules.
+Defaults to
+.Sq PREFIX/lib
+(but this default is almost always overridden by the application's
+configure script).
.It Ev INCLDIR
Installation directory for library header files.
Defaults to
Modified: trunk/mkconfigure.pl
===================================================================
--- trunk/mkconfigure.pl2012-07-27 05:04:26 UTC (rev 971)
+++ trunk/mkconfigure.pl2012-07-27 14:09:37 UTC (rev 972)
< at >< at > -736,6 +736,7 < at >< at >
'--exec-prefix=p' =>'Machine-dependent installation base',
'--bindir=p' =>'Executables for common users',
'--libdir=p' =>'System libraries',
+'--moduledir=P' =>'Dynamically loaded modules',
'--libexecdir=p' =>'Executables for program use',
'--datadir=P' =>'Data files for program use',
'--statedir=P' =>'Modifiable single-machine data',
< at >< at > -764,6 +765,7 < at >< at >
'--exec-prefix=p' =>'PREFIX',
'--bindir=p' =>'PREFIX/bin',
'--libdir=p' =>'PREFIX/lib',
+'--moduledir=P' =>'PREFIX/lib',
'--libexecdir=p' =>'PREFIX/libexec',
'--datadir=P' =>'PREFIX/share',
'--statedir=P' =>'PREFIX/var',
< at >< at > -937,6 +939,9 < at >< at >
--libdir=*)
libdir=$optarg
;;
+--moduledir=*)
+ moduledir=$optarg
+ ;;
--libexecdir=*)
libexecdir=$optarg
;;
< at >< at > -1320,6 +1325,7 < at >< at >
my < at >defPaths = (
'bindir:${PREFIX}/bin',
'libdir:${PREFIX}/lib',
+'moduledir:${PREFIX}/lib',
'libexecdir:${PREFIX}/libexec',
'datadir:${PREFIX}/share',
'statedir:${PREFIX}/var',
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-07-27 00:39:41 -0400 (Fri, 27 Jul 2012)
New Revision: 968
Modified:
trunk/BSDBuild/Core.pm
Log:
silence pkg-config error output
Modified: trunk/BSDBuild/Core.pm
... [More]
===================================================================
--- trunk/BSDBuild/Core.pm2012-07-26 08:47:04 UTC (rev 967)
+++ trunk/BSDBuild/Core.pm2012-07-27 04:39:41 UTC (rev 968)
< at >< at > -215,7 +215,7 < at >< at >
print << "EOF";
if [ "$pfx" != "" ]; then
-MK_EXEC_PKGPREFIX=`\$PKGCONFIG --variable=prefix $pkg`
+MK_EXEC_PKGPREFIX=`\$PKGCONFIG --variable=prefix $pkg 2>/dev/null`
if [ "\$MK_EXEC_PKGPREFIX" != "$pfx" ]; then
echo " "
echo "* "
< at >< at > -227,10 +227,10 < at >< at >
echo "* "
exit 1
else
-$define=`\$PKGCONFIG $pkg $args`
+$define=`\$PKGCONFIG $pkg $args 2>/dev/null`
fi
else
-$define=`\$PKGCONFIG $pkg $args`
+$define=`\$PKGCONFIG $pkg $args 2>/dev/null`
fi
EOF
}
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-07-26 04:47:04 -0400 (Thu, 26 Jul 2012)
New Revision: 967
Modified:
trunk/BSDBuild/cc_attributes.pm
Log:
test for unused variable attribute
Modified: trunk/BSDBuild/cc_attributes.pm
... [More]
===================================================================
--- trunk/BSDBuild/cc_attributes.pm2012-07-26 08:39:17 UTC (rev 966)
+++ trunk/BSDBuild/cc_attributes.pm2012-07-26 08:47:04 UTC (rev 967)
< at >< at > -142,7 +142,16 < at >< at >
return (rv);
}
EOF
+
+MkPrintN('checking for unused variable attribute...');
+TryCompileFlagsC('HAVE_UNUSED_VARIABLE_ATTRIBUTE', '', << 'EOF');
+int main(int argc, char *argv[])
+{
+int __attribute__ ((unused)) variable;
+return (0);
}
+EOF
+}
sub Emul
{
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-07-26 04:39:17 -0400 (Thu, 26 Jul 2012)
New Revision: 966
Modified:
trunk/BSDBuild/sse.pm
Log:
actually, screw gcc 4.6
Modified: trunk/BSDBuild/sse.pm
===================================================================
... [More]
--- trunk/BSDBuild/sse.pm2012-07-26 08:26:30 UTC (rev 965)
+++ trunk/BSDBuild/sse.pm2012-07-26 08:39:17 UTC (rev 966)
< at >< at > -27,7 +27,7 < at >< at >
{
my ($ver) = < at >_;
-MkDefine('SSE_CFLAGS', '-msse -Wno-unused-but-set-variable');
+MkDefine('SSE_CFLAGS', '-msse');
# XXX cross compiling
MkCompileAndRunC('HAVE_SSE', '${CFLAGS} ${SSE_CFLAGS}', '', << 'EOF');
#include <xmmintrin.h>
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-07-26 04:26:30 -0400 (Thu, 26 Jul 2012)
New Revision: 965
Modified:
trunk/BSDBuild/sse.pm
Log:
pass -Wno-unused-but-set-variable along with SSE_CFLAGS for gcc 4.6,
since the SSE ops rely on register variables.
... [More]
Modified: trunk/BSDBuild/sse.pm
===================================================================
--- trunk/BSDBuild/sse.pm2012-07-26 08:13:57 UTC (rev 964)
+++ trunk/BSDBuild/sse.pm2012-07-26 08:26:30 UTC (rev 965)
< at >< at > -27,7 +27,7 < at >< at >
{
my ($ver) = < at >_;
-MkDefine('SSE_CFLAGS', '-msse');
+MkDefine('SSE_CFLAGS', '-msse -Wno-unused-but-set-variable');
# XXX cross compiling
MkCompileAndRunC('HAVE_SSE', '${CFLAGS} ${SSE_CFLAGS}', '', << 'EOF');
#include <xmmintrin.h>
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-07-26 04:13:57 -0400 (Thu, 26 Jul 2012)
New Revision: 964
Modified:
trunk/mkdep
Log:
allow "-m" options through (e.g., -msse and -maltivec may be needed)
Modified: trunk/mkdep
... [More]
===================================================================
--- trunk/mkdep2012-07-22 02:54:13 UTC (rev 963)
+++ trunk/mkdep2012-07-26 08:13:57 UTC (rev 964)
< at >< at > -74,7 +74,7 < at >< at >
for arg
do
case "${arg}" in
--I*|-D*|*.c*)
+-I*|-D*|-m*|*.c*)
ccargs="${ccargs} ${arg}"
;;
esac
[Less]
|
Posted
over 12 years
ago
by
BSDBuild-SVN
Author: vedge
Date: 2012-07-21 22:54:13 -0400 (Sat, 21 Jul 2012)
New Revision: 963
Removed:
trunk/build.den.mk
trunk/man/build.den.mk.5
Modified:
trunk/Makefile
trunk/man/Makefile
Log:
remove build.den.mk
Modified: trunk/Makefile
... [More]
===================================================================
--- trunk/Makefile2012-07-22 02:53:55 UTC (rev 962)
+++ trunk/Makefile2012-07-22 02:54:13 UTC (rev 963)
< at >< at > -20,7 +20,7 < at >< at >
gen-includelinks.pl \
build.common.mk build.dep.mk build.lib.mk build.man.mk \
build.perl.mk build.prog.mk build.subdir.mk build.www.mk \
-build.po.mk build.doc.mk build.den.mk build.proj.mk
+build.po.mk build.doc.mk build.proj.mk
LTFILES=config.guess config.sub configure configure.in ltconfig ltmain..sh
Modified: trunk/man/Makefile
===================================================================
--- trunk/man/Makefile2012-07-22 02:53:55 UTC (rev 962)
+++ trunk/man/Makefile2012-07-22 02:54:13 UTC (rev 963)
< at >< at > -7,7 +7,6 < at >< at >
uman.1
MAN5=build.common.mk.5 \
-build.den.mk.5 \
build.dep.mk.5 \
build.lib.mk.5 \
build.prog.mk.5 \
[Less]
|