[Midnightbsd-cvs] mports [24406] trunk/databases/leveldb: fixup platform

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Sep 26 20:00:59 EDT 2018


Revision: 24406
          http://svnweb.midnightbsd.org/mports/?rev=24406
Author:   laffer1
Date:     2018-09-26 20:00:58 -0400 (Wed, 26 Sep 2018)
Log Message:
-----------
fixup platform

Modified Paths:
--------------
    trunk/databases/leveldb/Makefile
    trunk/databases/leveldb/files/patch-build_detect_platform

Added Paths:
-----------
    trunk/databases/leveldb/files/patch-port_port_posix.h

Modified: trunk/databases/leveldb/Makefile
===================================================================
--- trunk/databases/leveldb/Makefile	2018-09-26 23:48:46 UTC (rev 24405)
+++ trunk/databases/leveldb/Makefile	2018-09-27 00:00:58 UTC (rev 24406)
@@ -34,9 +34,6 @@
 GPERFTOOLS_LIB_DEPENDS=	libtcmalloc.so:devel/google-perftools
 SNAPPY_LIB_DEPENDS=	libsnappy.so:archivers/snappy
 
-post-patch:
-	@${REINPLACE_CMD} -e '/PLATFORM_IS_LITTLE_ENDIAN/ s|__|_|g' ${WRKSRC}/port/port_posix.h
-
 post-patch-GPERFTOOLS-off:
 	@${REINPLACE_CMD} -e 's| -ltcmalloc||' ${WRKSRC}/build_detect_platform
 

Modified: trunk/databases/leveldb/files/patch-build_detect_platform
===================================================================
--- trunk/databases/leveldb/files/patch-build_detect_platform	2018-09-26 23:48:46 UTC (rev 24405)
+++ trunk/databases/leveldb/files/patch-build_detect_platform	2018-09-27 00:00:58 UTC (rev 24406)
@@ -1,6 +1,20 @@
---- build_detect_platform.orig	2017-03-02 00:08:02 UTC
-+++ build_detect_platform
-@@ -224,7 +224,7 @@ EOF
+--- build_detect_platform.orig	2017-03-01 19:08:02.000000000 -0500
++++ build_detect_platform	2018-09-26 19:56:37.401729000 -0400
+@@ -110,6 +110,13 @@
+         PORT_FILE=port/port_posix.cc
+         PORT_SSE_FILE=port/port_posix_sse.cc
+         ;;
++    MidnightBSD)
++        PLATFORM=OS_MIDNIGHTBSD
++        COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_MIDNIGHTBSD"
++        PLATFORM_LIBS="-lpthread"
++        PORT_FILE=port/port_posix.cc
++        PORT_SSE_FILE=port/port_posix_sse.cc
++        ;;
+     NetBSD)
+         PLATFORM=OS_NETBSD
+         COMMON_FLAGS="$MEMCMP_FLAG -D_REENTRANT -DOS_NETBSD"
+@@ -224,7 +231,7 @@
      rm -f $CXXOUTPUT 2>/dev/null
  
      # Test if gcc SSE 4.2 is supported

Added: trunk/databases/leveldb/files/patch-port_port_posix.h
===================================================================
--- trunk/databases/leveldb/files/patch-port_port_posix.h	                        (rev 0)
+++ trunk/databases/leveldb/files/patch-port_port_posix.h	2018-09-27 00:00:58 UTC (rev 24406)
@@ -0,0 +1,35 @@
+--- port/port_posix.h.bak	2017-03-01 19:08:02.000000000 -0500
++++ port/port_posix.h	2018-09-26 19:53:23.178008000 -0400
+@@ -22,7 +22,7 @@
+     #define PLATFORM_IS_LITTLE_ENDIAN false
+   #endif
+ #elif defined(OS_FREEBSD) || defined(OS_OPENBSD) ||\
+-      defined(OS_NETBSD) || defined(OS_DRAGONFLYBSD)
++      defined(OS_NETBSD) || defined(OS_DRAGONFLYBSD) || defined(OS_MIDNIGHTBSD)
+   #include <sys/types.h>
+   #include <sys/endian.h>
+   #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
+@@ -47,12 +47,12 @@
+ #include "port/atomic_pointer.h"
+ 
+ #ifndef PLATFORM_IS_LITTLE_ENDIAN
+-#define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
++#define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
+ #endif
+ 
+ #if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
+     defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
+-    defined(OS_ANDROID) || defined(OS_HPUX) || defined(CYGWIN)
++    defined(OS_ANDROID) || defined(OS_HPUX) || defined(CYGWIN) || defined(OS_MIDNIGHTBSD)
+ // Use fread/fwrite/fflush on platforms without _unlocked variants
+ #define fread_unlocked fread
+ #define fwrite_unlocked fwrite
+@@ -60,7 +60,7 @@
+ #endif
+ 
+ #if defined(OS_MACOSX) || defined(OS_FREEBSD) ||\
+-    defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD)
++    defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) || defined(OS_MIDNIGHTBSD)
+ // Use fsync() on platforms without fdatasync()
+ #define fdatasync fsync
+ #endif


Property changes on: trunk/databases/leveldb/files/patch-port_port_posix.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list