import nxcomp 3.2.0-6

Library to compress the standard X protocol.

based on work by bernd@, ok bernd@
This commit is contained in:
jasper 2008-06-13 17:12:42 +00:00
parent 4f10fbfb2b
commit 330e869810
9 changed files with 222 additions and 0 deletions

36
x11/nx/nxcomp/Makefile Normal file
View File

@ -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 <bsd.port.mk>

5
x11/nx/nxcomp/distinfo Normal file
View File

@ -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

View File

@ -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;

View File

@ -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)

View File

@ -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 <sys/types.h>
#include <sys/stat.h>
-#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
+#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__)
#include <netinet/in_systm.h>
#endif

View File

@ -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 <sys/types.h>
#include <sys/utsname.h>
-#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
+#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__)
#include <netinet/in_systm.h>
#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

View File

@ -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)

1
x11/nx/nxcomp/pkg/DESCR Normal file
View File

@ -0,0 +1 @@
Library to compress the standard X protocol.

12
x11/nx/nxcomp/pkg/PLIST Normal file
View File

@ -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}