diff options
author | dholland <dholland@pkgsrc.org> | 2008-08-17 20:09:12 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2008-08-17 20:09:12 +0000 |
commit | 89fb84fa74256995dc88a4be23cad32c4811ef85 (patch) | |
tree | 36d8377acb250daada838f7dd71f2fc9d1d0ffe4 | |
parent | 7c16ea71a81190ac665ebde8ab60beddefe65e1c (diff) | |
download | pkgsrc-89fb84fa74256995dc88a4be23cad32c4811ef85.tar.gz |
Fix broken amd64 build:
- use -fPIC in all the needed places.
- add USE_TOOLS+=gmake; this requires gmake to build properly.
- add missing dir to PLIST.
Also fix some LP64 issues that warned but didn't break the build.
Note however that the SSL code will not work in an LP64 environment;
it relies heavily on being able to cast pointers to int without losing
information. The ssl option should probably be blacklisted on LP64
platforms.
PKGREVISION++.
-rw-r--r-- | www/screws/Makefile | 6 | ||||
-rw-r--r-- | www/screws/PLIST | 3 | ||||
-rw-r--r-- | www/screws/distinfo | 8 | ||||
-rw-r--r-- | www/screws/patches/patch-ae | 32 | ||||
-rw-r--r-- | www/screws/patches/patch-ag | 34 | ||||
-rw-r--r-- | www/screws/patches/patch-aj | 21 | ||||
-rw-r--r-- | www/screws/patches/patch-ak | 20 |
7 files changed, 105 insertions, 19 deletions
diff --git a/www/screws/Makefile b/www/screws/Makefile index 0d198f4425d..b47c05c1906 100644 --- a/www/screws/Makefile +++ b/www/screws/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.22 2008/05/25 21:42:22 joerg Exp $ +# $NetBSD: Makefile,v 1.23 2008/08/17 20:09:12 dholland Exp $ # DISTNAME= screws-0.56 -PKGREVISION= 5 +PKGREVISION= 6 CATEGORIES= www MASTER_SITES= ftp://ftp.nopcode.org/prj/screws/ @@ -10,7 +10,7 @@ MAINTAINER= pancake@phreaker.net HOMEPAGE= http://www.nopcode.org/?t=screws COMMENT= SCRipt Enhanced Web Server -USE_TOOLS+= perl:run pax +USE_TOOLS+= perl:run pax gmake PKG_GROUPS_VARS+= SCREWS_GROUP PKG_USERS_VARS+= SCREWS_USER diff --git a/www/screws/PLIST b/www/screws/PLIST index f9b643af589..aa0822e9ca2 100644 --- a/www/screws/PLIST +++ b/www/screws/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.7 2007/12/31 07:05:00 obache Exp $ +@comment $NetBSD: PLIST,v 1.8 2008/08/17 20:09:12 dholland Exp $ bin/hsml lib/screws/BasicExec.so lib/screws/CleanLog.so @@ -91,6 +91,7 @@ share/screws/mime.types @dirrm share/screws/hsml-inc @dirrm share/screws @dirrm share/examples/screws +@dirrm share/doc/screws/examples @dirrm share/doc/screws @dirrm libexec/screws/sh @dirrm libexec/screws/perl/htdocs/example.xslt diff --git a/www/screws/distinfo b/www/screws/distinfo index 98e81b32dac..3afe8895cea 100644 --- a/www/screws/distinfo +++ b/www/screws/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.13 2006/11/03 21:29:45 rillig Exp $ +$NetBSD: distinfo,v 1.14 2008/08/17 20:09:12 dholland Exp $ SHA1 (screws-0.56.tar.gz) = 3335e7e7116561499ee7164831c31df4ecebe403 RMD160 (screws-0.56.tar.gz) = 5d7f1af67a42cd5726f0d4708713bb13c4c8fe21 @@ -7,8 +7,10 @@ SHA1 (patch-aa) = 0101b7083bb45358371a3853783f9c65cc5b2435 SHA1 (patch-ab) = d5f8997c9e1ed2795591e4d29605e9208351bf81 SHA1 (patch-ac) = 7d0542f65b24ba9d7ed035c140d7165a19b2f73d SHA1 (patch-ad) = 984fa51aff7d17ba69f3ea1c0b9cf4bbb70e3973 -SHA1 (patch-ae) = 081cb01537481d48cbc37a96ea72e242db76e7ae +SHA1 (patch-ae) = 75eb9410182c7c21d1090b02cc4bebc3739b1cb7 SHA1 (patch-af) = 9ac19813079a67c8f01ea5d2b3a85c309db00f95 -SHA1 (patch-ag) = cd3b907cd839f51fd0180e1f0bb40102f01c41f2 +SHA1 (patch-ag) = cfb6127800ea749c67e1638d5a4b23c7650a0c17 SHA1 (patch-ah) = 90ba05b735295caa1ce6974ac5d7c1d35799c49f SHA1 (patch-ai) = 76c15330b3f3ba3c9d7442d98ea461e6b89ce33d +SHA1 (patch-aj) = f2b4c3d70c309a5221fea0d6ff008a597c9f8411 +SHA1 (patch-ak) = fde982c23af9f6c1d724276f8e8f5dd19b0faebe diff --git a/www/screws/patches/patch-ae b/www/screws/patches/patch-ae index e10383a27b3..a2a29ae9469 100644 --- a/www/screws/patches/patch-ae +++ b/www/screws/patches/patch-ae @@ -1,17 +1,19 @@ -$NetBSD: patch-ae,v 1.3 2006/08/14 22:36:47 wiz Exp $ +$NetBSD: patch-ae,v 1.4 2008/08/17 20:09:12 dholland Exp $ ---- src/Hsml/Makefile.orig 2004-11-08 22:41:48.000000000 +0000 -+++ src/Hsml/Makefile -@@ -7,7 +7,7 @@ DEBUG=-g +--- src/Hsml/Makefile.orig 2004-11-08 17:41:48.000000000 -0500 ++++ src/Hsml/Makefile 2008-08-17 15:34:05.000000000 -0400 +@@ -7,15 +7,16 @@ DEBUG=-g DEFS+= -DINCORE_LUA=${INCORE_LUA} DEFS+= -DPATH_JAVA=\"${JAVA}\" DEFS+= -DPATH_CC=\"${PATH_CC}\" -CFLAGS= -I/usr/pkg/include -I/usr/local/include ${DEBUG} ${DEFS} +CFLAGS+= ${DEBUG} ${DEFS} ++PICFLAGS?=-fPIC %.o: %.c @echo "[hsml] $<" -@@ -15,7 +15,7 @@ CFLAGS= -I/usr/pkg/include -I/usr/local/ +- @${CC} $< -c ${CFLAGS} -o $@ ++ @${CC} $< -c ${CFLAGS} ${PICFLAGS} -o $@ all: opts ${OBJ} langs @echo "[hsml] LINKING..." @@ -20,7 +22,7 @@ $NetBSD: patch-ae,v 1.3 2006/08/14 22:36:47 wiz Exp $ @echo "-----------------" clean: -@@ -24,7 +24,7 @@ clean: +@@ -24,7 +25,7 @@ clean: opts: echo > .opts @@ -29,3 +31,21 @@ $NetBSD: patch-ae,v 1.3 2006/08/14 22:36:47 wiz Exp $ else echo "" > .opts ; fi if [ "`uname`" = "Linux" ]; then echo " -ldl " >> .opts ; fi +@@ -42,13 +43,13 @@ check: + + langs: + @echo "[hsml] C lang module" +- @${CC} ${CFLAGS} lang_c.c -shared -o lang_c.so ++ @${CC} ${CFLAGS} ${PICFLAGS} lang_c.c -shared -o lang_c.so + @echo "[hsml] Perl lang module" +- @${CC} ${CFLAGS} lang_perl.c -shared -o lang_perl.so ++ @${CC} ${CFLAGS} ${PICFLAGS} lang_perl.c -shared -o lang_perl.so + @echo "[hsml] Python lang module" +- @${CC} ${CFLAGS} lang_python.c -shared -o lang_python.so ++ @${CC} ${CFLAGS} ${PICFLAGS} lang_python.c -shared -o lang_python.so + @echo "[hsml] Brainfuck lang module" +- @${CC} ${CFLAGS} lang_brainfuck.c -shared -o lang_brainfuck.so ++ @${CC} ${CFLAGS} ${PICFLAGS} lang_brainfuck.c -shared -o lang_brainfuck.so + + modules_install: + install -c -m 0755 \ diff --git a/www/screws/patches/patch-ag b/www/screws/patches/patch-ag index 5450a98e196..e95f23df78e 100644 --- a/www/screws/patches/patch-ag +++ b/www/screws/patches/patch-ag @@ -1,13 +1,35 @@ -$NetBSD: patch-ag,v 1.1 2006/08/14 22:36:47 wiz Exp $ +$NetBSD: patch-ag,v 1.2 2008/08/17 20:09:12 dholland Exp $ ---- src/Modules/Makefile.orig 2004-09-16 22:05:58.000000000 +0000 -+++ src/Modules/Makefile -@@ -22,7 +22,7 @@ hsmlexec: +--- src/Modules/Makefile.orig 2004-09-16 18:05:58.000000000 -0400 ++++ src/Modules/Makefile 2008-08-17 15:31:09.000000000 -0400 +@@ -5,6 +5,7 @@ HSMLEXEC_MOD=HsmlExec.so + HSMLEXEC_OBJS=HsmlExec.o ../Hsml/Cache.o ../Hsml/Headers.o ../Hsml/SubLang.o + CFLAGS+=${DEFS} + CFLAGS+=-I/usr/pkg/include ++PICFLAGS?=-fPIC + #libscrews.a + LDFLAGS+=-Wl,-R${PREFIX}/lib -L${PREFIX}/lib -L. + #-lscrews +@@ -13,7 +14,7 @@ all: hsmlexec + @if [ "${DLOPEN}" = "1" ]; then \ + for A in $(MODS); do \ + echo "[modules] $$A.so"; \ +- $(CC) ${CFLAGS} -fPIC -c $$A.c ; \ ++ $(CC) ${CFLAGS} ${PICFLAGS} -c $$A.c ; \ + $(CC) ${LDFLAGS} -o $$A.so -shared $$A.o ; done ; fi + @echo "** BUILD MODULES ** OK" + +@@ -21,10 +22,10 @@ hsmlexec: + @rm -f HsmlExec.o @if [ "${INCORE_LUA}" = "1" ]; then \ echo "[modules] HsmlExec.so << injecting lua into the core." ;\ - ${CC} ${CFLAGS} -DINCORE_LUA=1 -fPIC -c HsmlExec.c ;\ +- ${CC} ${CFLAGS} -DINCORE_LUA=1 -fPIC -c HsmlExec.c ;\ - ${CC} ${LDFLAGS} -lm -llua -llualib ${HSMLEXEC_OBJS} -shared -o ${HSMLEXEC_MOD} ;\ ++ ${CC} ${CFLAGS} ${PICFLAGS} -DINCORE_LUA=1 -c HsmlExec.c ;\ + ${CC} ${LDFLAGS} -lm -llua ${HSMLEXEC_OBJS} -shared -o ${HSMLEXEC_MOD} ;\ else \ - $(CC) ${CFLAGS} -c HsmlExec.c ;\ +- $(CC) ${CFLAGS} -c HsmlExec.c ;\ ++ $(CC) ${CFLAGS} ${PICFLAGS} -c HsmlExec.c ;\ $(CC) ${LDFLAGS} ${HSMLEXEC_OBJS} -shared -o ${HSMLEXEC_MOD} ;\ + fi + diff --git a/www/screws/patches/patch-aj b/www/screws/patches/patch-aj new file mode 100644 index 00000000000..ca69feee064 --- /dev/null +++ b/www/screws/patches/patch-aj @@ -0,0 +1,21 @@ +$NetBSD: patch-aj,v 1.1 2008/08/17 20:09:12 dholland Exp $ + +--- src/Server/Error.c~ 2004-09-16 18:05:58.000000000 -0400 ++++ src/Server/Error.c 2008-08-17 15:55:37.000000000 -0400 +@@ -3,6 +3,7 @@ + * Copylefted by pancake@phreaker.net at 2003 + */ + ++#include <unistd.h> + #include "Error.h" + + /* Error strings array */ +@@ -45,7 +46,7 @@ Error(str,err) + char *cwd; + if ( err==ERROR_CHDIR ) + { +- cwd=(char*)getcwd((char*)0,0); // Use static instead of alloc ++ cwd=getcwd((char*)0,0); // Use static instead of alloc + if (cwd) + { + printf("CWD : %s",cwd); diff --git a/www/screws/patches/patch-ak b/www/screws/patches/patch-ak new file mode 100644 index 00000000000..341de22f559 --- /dev/null +++ b/www/screws/patches/patch-ak @@ -0,0 +1,20 @@ +$NetBSD: patch-ak,v 1.1 2008/08/17 20:09:12 dholland Exp $ + +--- src/Hsml/Headers.c~ 2004-09-16 18:05:58.000000000 -0400 ++++ src/Hsml/Headers.c 2008-08-17 15:59:15.000000000 -0400 +@@ -1,4 +1,6 @@ + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + + // HEADERS + char headers[1024]=""; +@@ -11,7 +13,7 @@ void addHeader(char *str) + void printHeaders() + { + char *http; +- http=(char *)getenv("HTTP"); ++ http=getenv("HTTP"); + if (http&&http[0]=='1') + if (http) + { |