From 330e869810f85c282f4f7759751dcdcb6877c431 Mon Sep 17 00:00:00 2001 From: jasper Date: Fri, 13 Jun 2008 17:12:42 +0000 Subject: [PATCH] import nxcomp 3.2.0-6 Library to compress the standard X protocol. based on work by bernd@, ok bernd@ --- x11/nx/nxcomp/Makefile | 36 ++++++++++++ x11/nx/nxcomp/distinfo | 5 ++ x11/nx/nxcomp/patches/patch-Children_cpp | 12 ++++ x11/nx/nxcomp/patches/patch-Makefile_in | 50 ++++++++++++++++ x11/nx/nxcomp/patches/patch-Proxy_cpp | 12 ++++ x11/nx/nxcomp/patches/patch-Socket_cpp | 21 +++++++ x11/nx/nxcomp/patches/patch-configure_in | 73 ++++++++++++++++++++++++ x11/nx/nxcomp/pkg/DESCR | 1 + x11/nx/nxcomp/pkg/PLIST | 12 ++++ 9 files changed, 222 insertions(+) create mode 100644 x11/nx/nxcomp/Makefile create mode 100644 x11/nx/nxcomp/distinfo create mode 100644 x11/nx/nxcomp/patches/patch-Children_cpp create mode 100644 x11/nx/nxcomp/patches/patch-Makefile_in create mode 100644 x11/nx/nxcomp/patches/patch-Proxy_cpp create mode 100644 x11/nx/nxcomp/patches/patch-Socket_cpp create mode 100644 x11/nx/nxcomp/patches/patch-configure_in create mode 100644 x11/nx/nxcomp/pkg/DESCR create mode 100644 x11/nx/nxcomp/pkg/PLIST diff --git a/x11/nx/nxcomp/Makefile b/x11/nx/nxcomp/Makefile new file mode 100644 index 00000000000..d660dd07ece --- /dev/null +++ b/x11/nx/nxcomp/Makefile @@ -0,0 +1,36 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2008/06/13 17:12:42 jasper Exp $ + +COMMENT= library to compress the standard X protocol + +VERSION= 3.2.0 +DASHVERSION= 6 +DISTNAME= nxcomp-${VERSION}-${DASHVERSION} +PKGNAME= nxcomp-${VERSION}.${DASHVERSION} +SHARED_LIBS= Xcomp 0.0 + +WANTLIB= z + +LIB_DEPENDS= jpeg::graphics/jpeg \ + png::graphics/png + +AUTOCONF_VERSION= 2.59 +CONFIGURE_STYLE= gnu autoconf +CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \ + LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib" \ + LIBXcomp_VERSION=${LIBXcomp_VERSION} \ + CFLAGS="${CFLAGS}" \ + CXXFLAGS="${CXXFLAGS}" + +WRKDIST= ${WRKDIR}/nxcomp + +USE_X11= Yes + +do-install: + ${INSTALL_DATA} ${WRKBUILD}/libXcomp.so.${LIBXcomp_VERSION} \ + ${PREFIX}/lib + ${INSTALL_DATA} ${WRKBUILD}/libXcomp.a ${PREFIX}/lib + ${INSTALL_DATA_DIR} ${PREFIX}/include/nx + ${INSTALL_DATA} ${WRKBUILD}/NX*.h ${PREFIX}/include/nx + ${INSTALL_DATA} ${WRKBUILD}/MD5.h ${PREFIX}/include/nx + +.include diff --git a/x11/nx/nxcomp/distinfo b/x11/nx/nxcomp/distinfo new file mode 100644 index 00000000000..98d80f9b90f --- /dev/null +++ b/x11/nx/nxcomp/distinfo @@ -0,0 +1,5 @@ +MD5 (nx/nxcomp-3.2.0-6.tar.gz) = W0UnKeDJYHI6F0yvog/j3A== +RMD160 (nx/nxcomp-3.2.0-6.tar.gz) = KON2+XY3flXfR43b62mkEPT2tqE= +SHA1 (nx/nxcomp-3.2.0-6.tar.gz) = OTxA74/oAC236nxnNE1Q0fuMZGE= +SHA256 (nx/nxcomp-3.2.0-6.tar.gz) = G2PbkWzpvJg6lb/jVlWALX381/WfLtuYTNeKxwo4nko= +SIZE (nx/nxcomp-3.2.0-6.tar.gz) = 532373 diff --git a/x11/nx/nxcomp/patches/patch-Children_cpp b/x11/nx/nxcomp/patches/patch-Children_cpp new file mode 100644 index 00000000000..01a233e1bf0 --- /dev/null +++ b/x11/nx/nxcomp/patches/patch-Children_cpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-Children_cpp,v 1.1.1.1 2008/06/13 17:12:42 jasper Exp $ +--- Children.cpp.orig Wed Apr 16 15:18:00 2008 ++++ Children.cpp Wed Apr 16 15:18:00 2008 +@@ -1016,7 +1016,7 @@ int UnsetEnv(char *name) + + #else + +- #ifdef __APPLE__ ++ #if defined(__APPLE__) || defined(__OpenBSD__) + + unsetenv(name); + result = 0; diff --git a/x11/nx/nxcomp/patches/patch-Makefile_in b/x11/nx/nxcomp/patches/patch-Makefile_in new file mode 100644 index 00000000000..8458dadfd93 --- /dev/null +++ b/x11/nx/nxcomp/patches/patch-Makefile_in @@ -0,0 +1,50 @@ +$OpenBSD: patch-Makefile_in,v 1.1.1.1 2008/06/13 17:12:42 jasper Exp $ +--- Makefile.in.orig Wed Sep 12 14:22:48 2007 ++++ Makefile.in Fri May 23 11:43:37 2008 +@@ -37,7 +37,7 @@ LIBVERSION=@LIBVERSION@ + + CXX = @CXX@ + CXXFLAGS = @CXXFLAGS@ @X_CFLAGS@ @DEFS@ \ +- -Wall -Wpointer-arith ++ -Wall -Wpointer-arith -fPIC + CXXINCLUDES = + CXXDEFINES = + +@@ -51,7 +51,7 @@ CCFLAGS = @CFLAGS@ @X_CFLAGS@ @DEFS@ \ + CCINCLUDES = + CCDEFINES = + +-LDFLAGS = @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ -fPIC + LIBS = @LIBS@ + + # +@@ -88,7 +88,7 @@ LIBRARY = Xcomp + LIBNAME = lib$(LIBRARY) + LIBFULL = lib$(LIBRARY).so.$(VERSION) + LIBLOAD = lib$(LIBRARY).so.$(LIBVERSION) +-LIBSHARED = lib$(LIBRARY).so ++LIBSHARED = lib$(LIBRARY).so.$(LIBVERSION) + LIBARCHIVE = lib$(LIBRARY).a + + LIBCYGSHARED = cyg$(LIBRARY).dll +@@ -225,16 +225,11 @@ MOBJ = $(MSRC:.c=.o) + COBJ = $(CSRC:.c=.o) + CXXOBJ = $(CXXSRC:.cpp=.o) + +-$(LIBFULL): $(CXXOBJ) $(COBJ) ++$(LIBSHARED): $(CXXOBJ) $(COBJ) + $(CXX) -o $@ $(LDFLAGS) $(CXXOBJ) $(COBJ) $(LIBS) + +-$(LIBLOAD): $(LIBFULL) +- rm -f $(LIBLOAD) +- ln -s $(LIBFULL) $(LIBLOAD) +- +-$(LIBSHARED): $(LIBFULL) +- rm -f $(LIBSHARED) +- ln -s $(LIBFULL) $(LIBSHARED) ++$(LIBLOAD): ++$(LIBSHARED): + + $(LIBARCHIVE): $(CXXOBJ) $(COBJ) + rm -f $(LIBARCHIVE) diff --git a/x11/nx/nxcomp/patches/patch-Proxy_cpp b/x11/nx/nxcomp/patches/patch-Proxy_cpp new file mode 100644 index 00000000000..de239fe489f --- /dev/null +++ b/x11/nx/nxcomp/patches/patch-Proxy_cpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-Proxy_cpp,v 1.1.1.1 2008/06/13 17:12:42 jasper Exp $ +--- Proxy.cpp.orig Thu Sep 6 23:53:05 2007 ++++ Proxy.cpp Thu Sep 6 23:53:17 2007 +@@ -22,7 +22,7 @@ + #include + #include + +-#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) ++#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) + #include + #endif + diff --git a/x11/nx/nxcomp/patches/patch-Socket_cpp b/x11/nx/nxcomp/patches/patch-Socket_cpp new file mode 100644 index 00000000000..9e91f8d53d7 --- /dev/null +++ b/x11/nx/nxcomp/patches/patch-Socket_cpp @@ -0,0 +1,21 @@ +$OpenBSD: patch-Socket_cpp,v 1.1.1.1 2008/06/13 17:12:42 jasper Exp $ +--- Socket.cpp.orig Thu Sep 6 23:53:26 2007 ++++ Socket.cpp Thu Sep 6 23:53:47 2007 +@@ -18,7 +18,7 @@ + #include + #include + +-#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) ++#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) + #include + #endif + +@@ -39,7 +39,7 @@ + // System specific defines. + // + +-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) ++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) + #define SOL_IP IPPROTO_IP + #endif + diff --git a/x11/nx/nxcomp/patches/patch-configure_in b/x11/nx/nxcomp/patches/patch-configure_in new file mode 100644 index 00000000000..82cad12dcdc --- /dev/null +++ b/x11/nx/nxcomp/patches/patch-configure_in @@ -0,0 +1,73 @@ +$OpenBSD: patch-configure_in,v 1.1.1.1 2008/06/13 17:12:42 jasper Exp $ +--- configure.in.orig Fri Dec 29 16:13:34 2006 ++++ configure.in Fri Jun 13 10:02:31 2008 +@@ -7,9 +7,6 @@ AC_PREREQ(2.13) + + dnl Set our default compilation flags. + +-CXXFLAGS="-O3 -fno-rtti -fno-exceptions" +-CFLAGS="-O3" +- + dnl Reset default linking directives. + + LIBSTATIC="" +@@ -77,7 +74,7 @@ case "${gcc_version}" in + + *) + AC_MSG_RESULT([yes]) +- CXXFLAGS="$CXXFLAGS -Wmissing-declarations -Wnested-externs" ++ CXXFLAGS="$CXXFLAGS" + ;; + esac + +@@ -157,6 +154,17 @@ FreeBSD= + test "$nxconf_cv_freebsd" = yes && FreeBSD=yes]) + nxconf_FreeBSD + ++dnl Check to see if we're running under OpenBSD. ++ ++AC_DEFUN(nxconf_OpenBSD, ++[AC_CACHE_CHECK(for OpenBSD environment, nxconf_cv_openbsd, ++[AC_TRY_COMPILE(,[return __OpenBSD__;], ++nxconf_cv_openbsd=yes, nxconf_cv_openbsd=no) ++rm -f conftest*]) ++OpenBSD= ++test "$nxconf_cv_openbsd" = yes && OpenBSD=yes]) ++nxconf_OpenBSD ++ + dnl Build PIC libraries. + + if test "$CYGWIN32" != yes -a "$DARWIN" != yes; then +@@ -182,6 +190,14 @@ if test "$FreeBSD" = yes; then + CFLAGS="$CFLAGS -I/usr/local/include" + fi + ++dnl On OpenBSD search libraries and includes under /usr/local. ++ ++if test "$OpenBSD" = yes; then ++ LIBS="$LIBS -L/usr/local/lib" ++ CXXFLAGS="$CXXFLAGS -Wno-deprecated -I/usr/local/include -I/usr/local/include/libpng" ++ CFLAGS="$CFLAGS -I/usr/local/include" ++fi ++ + dnl Under Darwin we don't have support for -soname option and + dnl we need the -bundle flag. Under Solaris, instead, we need + dnl the options -G -h. +@@ -228,7 +244,7 @@ else + fi + echo -e "compiling version ${VERSION}" + +-LIBVERSION=`echo ${VERSION} | cut -d '.' -f 1` ++LIBVERSION=${LIBXcomp_VERSION} + + CXXFLAGS="$CXXFLAGS -DVERSION=\\\"${VERSION}\\\"" + CFLAGS="$CFLAGS -DVERSION=\\\"${VERSION}\\\"" +@@ -387,7 +403,7 @@ if test "$CYGWIN32" = yes; then + ALL="\$(LIBCYGARCHIVE) \$(LIBCYGSHARED) \$(LIBARCHIVE)" + LIBS="-lstdc++ -lpng -ljpeg -lz" + else +- ALL="\$(LIBFULL) \$(LIBLOAD) \$(LIBSHARED) \$(LIBARCHIVE)" ++ ALL="\$(LIBSHARED) \$(LIBARCHIVE)" + fi + + AC_OUTPUT(Makefile) diff --git a/x11/nx/nxcomp/pkg/DESCR b/x11/nx/nxcomp/pkg/DESCR new file mode 100644 index 00000000000..8747b470b40 --- /dev/null +++ b/x11/nx/nxcomp/pkg/DESCR @@ -0,0 +1 @@ +Library to compress the standard X protocol. diff --git a/x11/nx/nxcomp/pkg/PLIST b/x11/nx/nxcomp/pkg/PLIST new file mode 100644 index 00000000000..a77a7804375 --- /dev/null +++ b/x11/nx/nxcomp/pkg/PLIST @@ -0,0 +1,12 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2008/06/13 17:12:42 jasper Exp $ +include/nx/ +include/nx/MD5.h +include/nx/NX.h +include/nx/NXalert.h +include/nx/NXmitshm.h +include/nx/NXpack.h +include/nx/NXproto.h +include/nx/NXrender.h +include/nx/NXvars.h +lib/libXcomp.a +@lib lib/libXcomp.so.${LIBXcomp_VERSION}