pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/screws Fix broken amd64 build:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a7a5b2323fac
branches:  trunk
changeset: 545962:a7a5b2323fac
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun Aug 17 20:09:12 2008 +0000

description:
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++.

diffstat:

 www/screws/Makefile         |   6 +++---
 www/screws/PLIST            |   3 ++-
 www/screws/distinfo         |   8 +++++---
 www/screws/patches/patch-ae |  32 ++++++++++++++++++++++++++------
 www/screws/patches/patch-ag |  34 ++++++++++++++++++++++++++++------
 www/screws/patches/patch-aj |  21 +++++++++++++++++++++
 www/screws/patches/patch-ak |  20 ++++++++++++++++++++
 7 files changed, 105 insertions(+), 19 deletions(-)

diffs (215 lines):

diff -r a3e3e62e50b1 -r a7a5b2323fac www/screws/Makefile
--- a/www/screws/Makefile       Sun Aug 17 19:00:26 2008 +0000
+++ b/www/screws/Makefile       Sun Aug 17 20:09:12 2008 +0000
@@ -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 @@
 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 -r a3e3e62e50b1 -r a7a5b2323fac www/screws/PLIST
--- a/www/screws/PLIST  Sun Aug 17 19:00:26 2008 +0000
+++ b/www/screws/PLIST  Sun Aug 17 20:09:12 2008 +0000
@@ -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 @@
 @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 -r a3e3e62e50b1 -r a7a5b2323fac www/screws/distinfo
--- a/www/screws/distinfo       Sun Aug 17 19:00:26 2008 +0000
+++ b/www/screws/distinfo       Sun Aug 17 20:09:12 2008 +0000
@@ -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-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 -r a3e3e62e50b1 -r a7a5b2323fac www/screws/patches/patch-ae
--- a/www/screws/patches/patch-ae       Sun Aug 17 19:00:26 2008 +0000
+++ b/www/screws/patches/patch-ae       Sun Aug 17 20:09:12 2008 +0000
@@ -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 @@
        @echo "-----------------"
  
  clean:
-@@ -24,7 +24,7 @@ clean:
+@@ -24,7 +25,7 @@ clean:
  
  opts:
        echo > .opts
@@ -29,3 +31,21 @@
        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 -r a3e3e62e50b1 -r a7a5b2323fac www/screws/patches/patch-ag
--- a/www/screws/patches/patch-ag       Sun Aug 17 19:00:26 2008 +0000
+++ b/www/screws/patches/patch-ag       Sun Aug 17 20:09:12 2008 +0000
@@ -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 -r a3e3e62e50b1 -r a7a5b2323fac www/screws/patches/patch-aj
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/screws/patches/patch-aj       Sun Aug 17 20:09:12 2008 +0000
@@ -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@localhost 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 -r a3e3e62e50b1 -r a7a5b2323fac www/screws/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/screws/patches/patch-ak       Sun Aug 17 20:09:12 2008 +0000
@@ -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)
+       {



Home | Main Index | Thread Index | Old Index