pkgsrc-WIP-changes archive

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

sdl-hercules-hyperion: more fixes. Now seems to work! Tested with SixPack 1.3.



Module Name:	pkgsrc-wip
Committed By:	Olaf Seibert <rhialto%falu.nl@localhost>
Pushed By:	rhialto
Date:		Sun Feb 9 16:29:07 2020 +0100
Changeset:	f4c3703c860f5f0d4008c8df0d15c73cc2560c86

Modified Files:
	sdl-hercules-hyperion/Makefile
	sdl-hercules-hyperion/distinfo
	sdl-hercules-hyperion/patches/patch-Makefile.am
	sdl-hercules-hyperion/patches/patch-configure.ac
Added Files:
	sdl-hercules-hyperion/patches/patch-hostopts.h
	sdl-hercules-hyperion/patches/patch-hthreads.h
Removed Files:
	sdl-hercules-hyperion/patches/patch-hthreads.c

Log Message:
sdl-hercules-hyperion: more fixes. Now seems to work! Tested with SixPack 1.3.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f4c3703c860f5f0d4008c8df0d15c73cc2560c86

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 sdl-hercules-hyperion/Makefile                   |   1 -
 sdl-hercules-hyperion/distinfo                   |   7 +-
 sdl-hercules-hyperion/patches/patch-Makefile.am  |   8 +-
 sdl-hercules-hyperion/patches/patch-configure.ac | 110 ++++++++++++++++++++++-
 sdl-hercules-hyperion/patches/patch-hostopts.h   |  34 +++++++
 sdl-hercules-hyperion/patches/patch-hthreads.c   |  16 ----
 sdl-hercules-hyperion/patches/patch-hthreads.h   |  19 ++++
 7 files changed, 170 insertions(+), 25 deletions(-)

diffs:
diff --git a/sdl-hercules-hyperion/Makefile b/sdl-hercules-hyperion/Makefile
index 8d13ad7354..8076a6aa5d 100644
--- a/sdl-hercules-hyperion/Makefile
+++ b/sdl-hercules-hyperion/Makefile
@@ -20,7 +20,6 @@ USE_LIBTOOL=	YES
 USE_LANGUAGES+=	c c++
 PTHREAD_OPTS+=	require
 
-CONFIGURE_ARGS+=	--disable-ipv6	# configure can't find header
 CONFIGURE_ARGS+=	--enable-extpkgs=${PREFIX}/lib/sdlhercules
 MAKE_ARGS+=	V=1
 
diff --git a/sdl-hercules-hyperion/distinfo b/sdl-hercules-hyperion/distinfo
index c02f337250..dc5810e981 100644
--- a/sdl-hercules-hyperion/distinfo
+++ b/sdl-hercules-hyperion/distinfo
@@ -4,13 +4,14 @@ SHA1 (Release_4.2.1.tar.gz) = ca2f9c802c05c4ddd528718c2a3b4df01ae09564
 RMD160 (Release_4.2.1.tar.gz) = cc8fd7e5deb2b2a857215172c13b237f1525858b
 SHA512 (Release_4.2.1.tar.gz) = 8d8e94136b3ffa57fc03f687c3b8662ccffb150a29904e911d2383eadd09ae732e73c1712e00bf9a8350fbdd31936f10c498e64574c4bd4316e82c1fb535ca68
 Size (Release_4.2.1.tar.gz) = 11124925 bytes
-SHA1 (patch-Makefile.am) = 01c1b8865febfd3451b2adbcc84ab7f91fc64964
+SHA1 (patch-Makefile.am) = 354add1d50bbbc09226e848f6b2e7350ad34f915
 SHA1 (patch-autoconf_hercules.m4) = 2ea0beaa0a0470050f0c41befcaebd9f73dad4d5
-SHA1 (patch-configure.ac) = b1bd6a6c17eb38ba9fb4d5d3a5b62285bfc4b332
+SHA1 (patch-configure.ac) = 5e2a92b3530fa4bd61a4f1e28ff98eab20f7d1b5
 SHA1 (patch-hercifc.c) = 5661ca325cb3575726a44ecadbaeb951fcf2d0fd
 SHA1 (patch-hifr.h) = d364bbd32143cf137aed84eb79f5af9f62f8210b
+SHA1 (patch-hostopts.h) = d464925f82570cbcf368f0b76d1b545a5eebacfd
 SHA1 (patch-hscutl.c) = 72ff77bff284e63bc42e124b56051fe735f74de6
-SHA1 (patch-hthreads.c) = 59ae36320b8ee7072a0fb8710e274ab17c2ffb47
+SHA1 (patch-hthreads.h) = 25004a78c3fd0a803c5f4e0b0de8d05819602ac9
 SHA1 (patch-htypes.h) = 7e057ae370b266758176fbe13964581cac5004f0
 SHA1 (patch-tuntap.c) = ea3ca480613781e9dc09479d32e6d1138cc396aa
 SHA1 (patch-tuntap.h) = 24946aab519beb6185800801f2bb38dccfdfef94
diff --git a/sdl-hercules-hyperion/patches/patch-Makefile.am b/sdl-hercules-hyperion/patches/patch-Makefile.am
index 62164824ac..0fca93453c 100644
--- a/sdl-hercules-hyperion/patches/patch-Makefile.am
+++ b/sdl-hercules-hyperion/patches/patch-Makefile.am
@@ -1,6 +1,7 @@
 $NetBSD$
 
 * Fix build. Use devel/libltdl instead of internal libltdl.
+- Build dynamic modules only dynamic (-shared), not also static.
 
 --- Makefile.am.orig	2019-09-10 18:06:20.000000000 +0000
 +++ Makefile.am
@@ -13,9 +14,12 @@ $NetBSD$
  
  #------------------------------------------------------------------------------
  
-@@ -142,7 +142,7 @@ dyndev_SRC =  \
+@@ -140,9 +140,9 @@ dyndev_SRC =  \
+ #                    to Windows DLLs
+ #-----------------------------------------------------------------
  
- XSTATIC =
+-XSTATIC =
++XSTATIC = -shared
  DYNSRC  =
 -LTDL    =  ltdl.c
 +LTDL    =
diff --git a/sdl-hercules-hyperion/patches/patch-configure.ac b/sdl-hercules-hyperion/patches/patch-configure.ac
index a1592f28e7..ddbdd62eac 100644
--- a/sdl-hercules-hyperion/patches/patch-configure.ac
+++ b/sdl-hercules-hyperion/patches/patch-configure.ac
@@ -1,10 +1,88 @@
 $NetBSD$
 
-test == is not portable.
+- test == is not portable.
+* 9efbcb8e This looks like a typo (variable does not match header file name)
+* e8c20aa1 More careful use of includes when testing for further features.
+* 73498d3c Add configure check for pthread_rwlockattr_setpshared().
+- Avoid -march=xxx because it makes binaries nonportable.
+
 
 --- configure.ac.orig	2019-09-10 18:06:20.000000000 +0000
 +++ configure.ac
-@@ -1202,7 +1202,7 @@ AC_CHECK_SIZEOF(size_t)
+@@ -684,7 +684,7 @@ AC_CHECK_HEADERS( linux/ipv6.h,   [hc_cv
+       #include <sys/socket.h>
+     #endif
+ ] )
+-AC_CHECK_HEADERS( net/if_var.h,   [hc_cv_have_net_in_var_h=yes],   [hc_cv_have_net_in_var_h=no],
++AC_CHECK_HEADERS( net/if_var.h,   [hc_cv_have_net_if_var_h=yes],   [hc_cv_have_net_if_var_h=no],
+ [
+     #include <sys/types.h>
+     #ifdef HAVE_SYS_SOCKET_H
+@@ -700,8 +700,10 @@ AC_CHECK_HEADERS( netinet/in_var.h,  [hc
+     #ifdef HAVE_SYS_SOCKET_H
+       #include <sys/socket.h>
+     #endif
+-    #ifdef HAVE_NET_IF_VAR_H
++    #ifdef HAVE_NET_IF_H
+       #include <net/if.h>
++    #endif
++    #ifdef HAVE_NET_IF_VAR_H
+       #include <net/if_var.h>
+     #endif
+     #ifdef HAVE_NETINET_IN_H
+@@ -714,12 +716,16 @@ AC_CHECK_HEADERS( netinet6/in6_var.h,  [
+     #ifdef HAVE_SYS_SOCKET_H
+       #include <sys/socket.h>
+     #endif
+-    #ifdef HAVE_NET_IF_VAR_H
++    #ifdef HAVE_NET_IF_H
+       #include <net/if.h>
++    #endif
++    #ifdef HAVE_NET_IF_VAR_H
+       #include <net/if_var.h>
+     #endif
+-    #ifdef HAVE_NETINET_IN_VAR_H
++    #ifdef HAVE_NETINET_IN_H
+       #include <netinet/in.h>
++    #endif
++    #ifdef HAVE_NETINET_IN_VAR_H
+       #include <netinet/in_var.h>
+     #endif
+ ] )
+@@ -1054,6 +1060,14 @@ if test "$hc_cv_have_getsetuid" != "yes"
+ fi
+ 
+ 
++if test "$hc_cv_have_pthread_h" = "yes"; then
++    save_CFLAGS="$CFLAGS"
++    CFLAGS="$CFLAGS -pthread"
++    AC_CHECK_FUNCS( pthread_create ) dnl tester for method of checking...
++    AC_CHECK_FUNCS( pthread_rwlockattr_setpshared )
++    CFLAGS="$save_CFLAGS"
++fi
++
+ #  FIXME: Disabled because some builtin ffs seem to be causing a problem.
+ #         (gcc 3.4 barfs on certain 'march=' settings?)
+ #AC_CHECK_FUNCS( ffs )
+@@ -1139,10 +1153,16 @@ AC_CHECK_MEMBERS( [struct in6_ifreq.ifr_
+     #ifdef HAVE_LINUX_IPV6_H
+       #include <linux/ipv6.h>
+     #endif
+-    #ifdef HAVE_NETINET6_IN6_VAR_H
++    #ifdef HAVE_NET_IF_H
+       #include <net/if.h>
++    #endif
++    #ifdef HAVE_NET_IF_VAR_H
+       #include <net/if_var.h>
++    #endif
++    #ifdef HAVE_NETINET_IN_H
+       #include <netinet/in.h>
++    #endif
++    #ifdef HAVE_NETINET6_IN6_VAR_H
+       #include <netinet/in_var.h>  // Not the ipv6 file, please
+     #endif
+ ] )
+@@ -1202,7 +1222,7 @@ AC_CHECK_SIZEOF(size_t)
  AC_CHECK_SIZEOF(int *)
  AC_CHECK_SIZEOF(off_t)
  
@@ -13,7 +91,17 @@ test == is not portable.
    AC_CHECK_SIZEOF(pthread_t)
  fi
  
-@@ -2943,9 +2943,9 @@ test  "$hc_cv_is_mingw"    =  "yes"  && 
+@@ -2740,7 +2760,8 @@ if test "$hc_cv_auto_optimize" = "yes"; 
+     if test "$hc_cv_is_intel_x86_arch" = "yes"; then
+ 
+         # Set CPU type
+-        hc_cv_optimization_flags="$hc_cv_optimization_flags -march=$hc_cv_intel_cpu_type"
++	# Don't do this: it makes binaries unportable.
++        #hc_cv_optimization_flags="$hc_cv_optimization_flags -march=$hc_cv_intel_cpu_type"
+ 
+         # Dynamically inline small block string operations
+         # (subroutine calls still made for large area calls)
+@@ -2943,9 +2964,9 @@ test  "$hc_cv_is_mingw"    =  "yes"  && 
  #------------------------------------------------------#
  
  if test "$hc_cv_opt_debug" = "yes"; then
@@ -25,3 +113,19 @@ test == is not portable.
  fi
  
  AC_CACHE_SAVE()
+@@ -3141,10 +3162,11 @@ extpkg_ldadd="${crypto_libdir}/${crypto_
+ ##----------------------------------------------------------------
+ ##                         DEBUGGING
+ ##----------------------------------------------------------------
+-## AC_MSG_NOTICE( [Using crypto_libdir    = ${crypto_libdir}]    )
+-## AC_MSG_NOTICE( [Using decnumber_libdir = ${decnumber_libdir}] )
+-## AC_MSG_NOTICE( [Using softfloat_libdir = ${softfloat_libdir}] )
+-## AC_MSG_NOTICE( [Using telnet_libdir    = ${telnet_libdir}]    )
++AC_MSG_NOTICE( [Using crypto_libdir    = ${crypto_libdir}]    )
++AC_MSG_NOTICE( [Using decnumber_libdir = ${decnumber_libdir}] )
++AC_MSG_NOTICE( [Using softfloat_libdir = ${softfloat_libdir}] )
++AC_MSG_NOTICE( [Using telnet_libdir    = ${telnet_libdir}]    )
++AC_MSG_NOTICE( [Using extpkg_ldadd     = ${extpkg_ldadd}]    )
+ 
+ EXTPKG_INCDIRS="${extpkg_incdirs}"
+ AC_SUBST(EXTPKG_INCDIRS)
diff --git a/sdl-hercules-hyperion/patches/patch-hostopts.h b/sdl-hercules-hyperion/patches/patch-hostopts.h
new file mode 100644
index 0000000000..cbf67198c2
--- /dev/null
+++ b/sdl-hercules-hyperion/patches/patch-hostopts.h
@@ -0,0 +1,34 @@
+$NetBSD$
+
+Add "Hard-coded NetBSD-specific features and options..."
+    
+all of these should really be configure checks of course...
+
+--- hostopts.h.orig	2019-09-10 18:06:20.000000000 +0000
++++ hostopts.h
+@@ -297,6 +297,25 @@
+ 
+ 
+ /*-------------------------------------------------------------------*/
++/* Hard-coded NetBSD-specific features and options...                */
++/*-------------------------------------------------------------------*/
++#elif defined(__NetBSD__)               /* "NetBSD" options          */
++
++#define DLL_IMPORT   extern
++#define DLL_EXPORT
++#define TUNTAP_IFF_RUNNING_NEEDED       /* Needed by tuntap driver?? */
++#undef  OPTION_SCSI_ERASE_TAPE          /* (NOT supported)           */
++#undef  OPTION_SCSI_ERASE_GAP           /* (NOT supported)           */
++#define MAX_DEVICE_THREADS          0   /* (0 == unlimited)          */
++#define MIXEDCASE_FILENAMES_ARE_UNIQUE  /* ("Foo" and "fOo" unique)  */
++#define HOW_TO_IMPLEMENT_SH_COMMAND       USE_ANSI_SYSTEM_API_FOR_SH_COMMAND
++#define SET_CONSOLE_CURSOR_SHAPE_METHOD   CURSOR_SHAPE_NOT_SUPPORTED
++#undef  OPTION_EXTCURS                  /* Normal cursor handling    */
++#define SCANDIR_CONST_STRUCT_DIRENT     /* define if scandir uses
++                                           const for struct dirent   */
++
++
++/*-------------------------------------------------------------------*/
+ /* Hard-coded GNU Linux-specific features and options...             */
+ /*-------------------------------------------------------------------*/
+ #elif defined(__gnu_linux__)            /* GNU Linux options         */
diff --git a/sdl-hercules-hyperion/patches/patch-hthreads.c b/sdl-hercules-hyperion/patches/patch-hthreads.c
deleted file mode 100644
index d12775ff59..0000000000
--- a/sdl-hercules-hyperion/patches/patch-hthreads.c
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- hthreads.c.orig	2020-02-08 18:02:21.803241719 +0000
-+++ hthreads.c
-@@ -279,9 +279,11 @@ DLL_EXPORT int  hthread_initialize_rwloc
-     if (rc)
-         goto fatal;
- 
-+#if !defined(__NetBSD__)
-     rc = hthread_rwlockattr_setpshared( &attr1, HTHREAD_RWLOCK_DEFAULT );
-     if (rc)
-         goto fatal;
-+#endif
- 
-     rc = hthread_mutexattr_settype( &attr2, HTHREAD_MUTEX_DEFAULT );
-     if (rc)
diff --git a/sdl-hercules-hyperion/patches/patch-hthreads.h b/sdl-hercules-hyperion/patches/patch-hthreads.h
new file mode 100644
index 0000000000..c642459886
--- /dev/null
+++ b/sdl-hercules-hyperion/patches/patch-hthreads.h
@@ -0,0 +1,19 @@
+$NetBSD$
+
+pthread_rwlockattr_setpshared(3) is hidden on NetBSD; use configure to check for it.
+
+--- hthreads.h.orig	2019-09-10 18:06:20.000000000 +0000
++++ hthreads.h
+@@ -164,7 +164,11 @@ typedef pthread_rwlock_t        HRWLOCK;
+ #define hthread_mutex_destroy( plk )            pthread_mutex_destroy( plk )
+ 
+ #define hthread_rwlockattr_init( pla )          pthread_rwlockattr_init( pla )
+-#define hthread_rwlockattr_setpshared( pla, s ) pthread_rwlockattr_setpshared( (pla), (s) )
++#if HAVE_PTHREAD_RWLOCKATTR_SETPSHARED
++# define hthread_rwlockattr_setpshared( pla, s ) pthread_rwlockattr_setpshared( (pla), (s) )
++#else /* HAVE_PTHREAD_RWLOCKATTR_SETPSHARED*/
++# define hthread_rwlockattr_setpshared( pla, s ) 0
++#endif /* HAVE_PTHREAD_RWLOCKATTR_SETPSHARED*/
+ #define hthread_rwlockattr_destroy( pla )       pthread_rwlockattr_destroy( pla )
+ 
+ #define hthread_rwlock_init( plk, pla )         pthread_rwlock_init( (plk), (pla) )


Home | Main Index | Thread Index | Old Index