Subject: Re: Problems with 2006Q3
To: None <pkgsrc-users@netbsd.org>
From: Hrvoje =?utf-8?q?Habjani=C4=87?= <hrvoje.habjanic@zg.t-com.hr>
List: pkgsrc-users
Date: 11/11/2006 11:14:25
--Boundary-00=_BKaVFVzNLvK21Bm
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


I did pull 2006Q3 again from CVS on 9.11. and noticed that my previous patches 
aren't in. Following patches are should be applied after my previous ones.

1. netcat
 - missing build for osf5.1

2. groff
 - library order problem (this one is quick fix ...)
 - missing getopt_long on Tru64 (autors, again, assume too much ...)

3. netpbm
 - jasper library requires jpeg library

4. openssl
 - authors assume, if this is Tru64, then one should use cc instead of gcc, 
which is wrong. I extended definitions so there is now gcc build tag, with 
threads and shared library support
 - because we are using gcc, some options which are passed to ld needed to be 
put in "-Wl" wrapper

5. please ignore my previous patches in mk/wrapper dir. The attached is all 
that is needed

6. additions to mk.conf
- following is content of mine mk.conf
<code>
USE_LANGUAGES+=                 c
CC=                             gcc
CFLAGS+=                        -D__arch64__

USE_LANGUAGES+=                 c++
CXX=                            g++
CXXFLAGS+=                      -D__arch64__

LDFLAGS+=                       -oldstyle_liblookup
</code>




H.

--Boundary-00=_BKaVFVzNLvK21Bm
Content-Type: text/x-diff;
  charset="utf-8";
  name="netpbm_ljpeg.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="netpbm_ljpeg.patch"

--- Makefile.config.in.orig	Thu Nov  9 19:01:05 2006
+++ Makefile.config.in	Thu Nov  9 19:01:27 2006
@@ -457,8 +457,8 @@
 # JASPERDEPLIBS is the libraries (-l options or file names) on which
 # The Jasper library depends -- i.e. what you have to link into any
 # executable that links in the Jasper library.
-JASPERDEPLIBS =
-#JASPERDEPLIBS = -ljpeg
+#JASPERDEPLIBS =
+JASPERDEPLIBS = -ljpeg
 
 # And the Utah Raster Toolkit (aka URT aka RLE) library:
 

--Boundary-00=_BKaVFVzNLvK21Bm
Content-Type: text/x-diff;
  charset="utf-8";
  name="groff_misc.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="groff_misc.patch"

--- src/utils/pfbtops/pfbtops.c.orig	Thu Nov  9 20:21:34 2006
+++ src/utils/pfbtops/pfbtops.c	Thu Nov  9 20:26:06 2006
@@ -166,21 +166,33 @@
 int main(int argc, char **argv)
 {
   int opt;
+#ifdef getopt_long
   static const struct option long_options[] = {
     { "help", no_argument, 0, CHAR_MAX + 1 },
     { "version", no_argument, 0, 'v' },
     { NULL, 0, 0, 0 }
   };
+#else
+  const char *short_options="vh";
+#endif /* getopt_long */
 
   program_name = argv[0];
 
+#ifdef getopt_long
   while ((opt = getopt_long(argc, argv, "v", long_options, NULL)) != EOF) {
+#else
+  while ((opt = getopt(argc, argv, short_options)) != EOF) {
+#endif /* long_options */
     switch (opt) {
     case 'v':
       printf("GNU pfbtops (groff) version %s\n", Version_string);
       exit(0);
       break;
+#ifdef getopt_long
     case CHAR_MAX + 1: /* --help */
+#else
+    case 'h': /* --help */
+#endif /* long_options */
       usage(stdout);
       exit(0);
       break;
--- src/devices/xditview/Makefile.sub.orig	Thu Nov  9 21:46:13 2006
+++ src/devices/xditview/Makefile.sub	Thu Nov  9 21:46:44 2006
@@ -3,7 +3,7 @@
 MLIB=$(LIBM)
 XLIBS=$(LIBXUTIL)
 EXTRA_CFLAGS=$(X_CFLAGS)
-EXTRA_LDFLAGS=$(X_LIBS) $(X_PRE_LIBS) -lXaw -lXmu -lXt -lX11 $(X_EXTRA_LIBS)
+EXTRA_LDFLAGS=$(X_LIBS) -lXaw -lXmu -lXt -lX11 $(X_EXTRA_LIBS) $(X_PRE_LIBS) -lXext
 OBJS=\
   device.$(OBJEXT) \
   draw.$(OBJEXT) \
--- src/utils/xtotroff/Makefile.sub.orig	Thu Nov  9 21:49:10 2006
+++ src/utils/xtotroff/Makefile.sub	Thu Nov  9 21:49:29 2006
@@ -3,6 +3,6 @@
 MLIB=$(LIBM)
 XLIBS=$(LIBXUTIL) $(LIBGROFF)
 EXTRA_CFLAGS=$(X_CFLAGS)
-EXTRA_LDFLAGS=$(X_LIBS) $(X_PRE_LIBS) -lXaw -lXt -lX11 $(X_EXTRA_LIBS)
+EXTRA_LDFLAGS=$(X_LIBS) -lXaw -lXt -lX11 $(X_EXTRA_LIBS) $(X_PRE_LIBS) -lXext
 OBJS=xtotroff.$(OBJEXT)
 CSRCS=$(srcdir)/xtotroff.c
--- src/utils/xtotroff/xtotroff.c.orig	Thu Nov  9 21:50:50 2006
+++ src/utils/xtotroff/xtotroff.c	Thu Nov  9 21:52:51 2006
@@ -226,16 +226,22 @@
   char *a, *b, c;
   FILE *map;
   int opt;
+#ifdef getopt_long
   static const struct option long_options[] = {
     { "help", no_argument, 0, CHAR_MAX + 1 },
     { "version", no_argument, 0, 'v' },
     { NULL, 0, 0, 0 }
   };
+#endif /* getopt_long */
 
   program_name = argv[0];
 
+#ifdef getopt_long
   while ((opt = getopt_long(argc, argv, "gr:s:v", long_options,
 			    NULL)) != EOF) {
+#else
+  while ((opt = getopt(argc, argv, "gr:s:v")) != EOF) {
+#endif /* getopt_long */
     switch (opt) {
     case 'g':
       /* unused; just for compatibility */

--Boundary-00=_BKaVFVzNLvK21Bm
Content-Type: text/x-diff;
  charset="utf-8";
  name="netcat_osf5.1.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="netcat_osf5.1.patch"

--- Makefile.orig	Wed Nov  8 17:49:53 2006
+++ Makefile	Wed Nov  8 17:50:08 2006
@@ -74,7 +74,7 @@
 	make -e $(ALL) $(MFLAGS) XFLAGS='-DIRIX -DSYSV=4 -D__svr4__' \
 	STATIC=-non_shared
 
-osf:
+osf osf5.1:
 	make -e $(ALL) $(MFLAGS) XFLAGS='-DOSF' STATIC=-non_shared
 
 # virtually the same as netbsd/bsd44lite/whatever

--Boundary-00=_BKaVFVzNLvK21Bm
Content-Type: text/x-diff;
  charset="utf-8";
  name="openssl_osf5.1.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="openssl_osf5.1.patch"

--- config.orig	Fri Nov 10 23:29:01 2006
+++ config	Fri Nov 10 23:30:14 2006
@@ -709,7 +709,13 @@
   *-*-openbsd) OUT="OpenBSD" ;;
   *86*-*-bsdi4) OUT="bsdi-elf-gcc" ;;
   *-*-osf) OUT="alphaold-cc" ;;
-  *-*-tru64) OUT="alpha-cc" ;;
+  *-*-tru64)
+	if [ "$CC" = "gcc" ]; then
+	  OUT="alpha-gcc"
+	else
+	  OUT="alpha-cc"
+	fi
+	;;
   *-*-OpenUNIX*)
 	if [ "$CC" = "gcc" ]; then
 	  OUT="OpenUNIX-8-gcc" 
--- Configure.orig	Fri Nov 10 23:37:49 2006
+++ Configure	Sat Nov 11 00:01:06 2006
@@ -359,7 +359,8 @@
 #
 # For gcc, the following gave a %50 speedup on a 164 over the 'DES_INT' version
 #
-"alpha-gcc","gcc:-O3::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
+"alphaold-gcc","gcc:-O3::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
+"alpha-gcc","gcc:-O3::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${alpha_asm}:dlfcn:tru64-shared:::.so",
 "alphaold-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:alpha-osf1-shared:::.so",
 "alpha164-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared:::.so",
 "alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${alpha_asm}:dlfcn:tru64-shared:::.so",
--- Makefile.org.orig	Sat Nov 11 00:02:17 2006
+++ Makefile.org	Sat Nov 11 00:03:54 2006
@@ -386,8 +386,8 @@
 		fi; \
 		( set -x; ${CC} ${SHARED_LDFLAGS} \
 			-shared -msym -o lib$$i.so \
-			-set_version "${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
-			-all lib$$i.a -none $$libs ${EX_LIBS} ) || exit 1; \
+			-Wl,-set_version,"${SHLIB_VERSION_HISTORY}${SHLIB_VERSION_NUMBER}" \
+			-Wl,-all lib$$i.a -Wl,-none $$libs ${EX_LIBS} ) || exit 1; \
 		libs="-l$$i $$libs"; \
 		done; \
 	fi

--Boundary-00=_BKaVFVzNLvK21Bm
Content-Type: text/x-diff;
  charset="utf-8";
  name="wrapper_osf5.1.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="wrapper_osf5.1.patch"

--- pkgsrc.cvs/mk/wrapper/cmd-sink-osf1-cc	2004-11-20 05:37:08.000000000 +0100
+++ pkgsrc.tru64/mk/wrapper/cmd-sink-osf1-cc	2006-11-09 01:07:19.000000000 +0100
@@ -34,6 +34,16 @@
 		esac
 		$debug_log $wrapperlog "    (cmd-sink-osf1-cc) drop: $dir [adding to osf1runpath]"
 		;;
+	-Wl,-h*)
+		arg="-Wl,-soname"${arg#"-Wl,-h"}
+		$debug_log $wrapperlog "    (cmd-sink-osf1-cc) pop: $arg"
+		. $buildcmd
+		;;
+	-oldstyle_liblookup)
+		arg="-Wl,-oldstyle_liblookup"
+		$debug_log $wrapperlog "    (cmd-sink-osf1-cc) pop: $arg"
+		. $buildcmd
+		;;
 	*)
 		. $buildcmd
 		;;
--- pkgsrc.cvs/mk/wrapper/cmd-sink-osf1-ld	2004-11-20 05:37:08.000000000 +0100
+++ pkgsrc.tru64/mk/wrapper/cmd-sink-osf1-ld	2006-11-09 01:04:51.000000000 +0100
@@ -33,11 +33,21 @@
 		esac
 		$debug_log $wrapperlog "    (cmd-sink-osf1-ld) drop: $dir [adding to osf1runpath]"
 		;;
+	-h)
+		arg="-soname"
+		$debug_log $wrapperlog "    (cmd-sink-osf1-ld) pop: $arg"
+		. $buildcmd
+		;;
 	-pthread)
 		arg="-lpthread"
 		$debug_log $wrapperlog "    (cmd-sink-osf1-ld) pop: $arg"
 		. $buildcmd
 		;;
+	-Wl,-oldstyle_liblookup)
+		arg="-oldstyle_liblookup"
+		$debug_log $wrapperlog "    (cmd-sink-osf1-ld) pop: $arg"
+		. $buildcmd
+		;;
 	*)
 		. $buildcmd
 		;;

--Boundary-00=_BKaVFVzNLvK21Bm--