From a6ceb4c1189ba47d189c25085e86f3c0a3035c16 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 4 May 2009 18:46:46 +0000 Subject: [PATCH] - fix detection of LINUX platform/define --- libvncserver-LINUX.patch | 16 ++++++++++++++++ libvncserver.spec | 19 ++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 libvncserver-LINUX.patch diff --git a/libvncserver-LINUX.patch b/libvncserver-LINUX.patch new file mode 100644 index 0000000..5c7fc52 --- /dev/null +++ b/libvncserver-LINUX.patch @@ -0,0 +1,16 @@ +Index: configure.ac +=================================================================== +--- configure.ac.orig ++++ configure.ac +@@ -636,9 +636,10 @@ fi + AC_CHECK_LIB(cygipc,shmget) + AM_CONDITIONAL(CYGIPC, test "$HAVE_CYGIPC" = "true") + + # Check if /dev/vcsa1 exists, if so, define LINUX +-AM_CONDITIONAL(LINUX, test -c /dev/vcsa1) ++dnl AM_CONDITIONAL(LINUX, test -c /dev/vcsa1) ++AM_CONDITIONAL(LINUX, test `uname` = Linux) + + # Check for OS X specific header + AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h, HAVE_OSX="true") + AM_CONDITIONAL(OSX, test "$HAVE_OSX" = "true") diff --git a/libvncserver.spec b/libvncserver.spec index c04b969..8d29e12 100644 --- a/libvncserver.spec +++ b/libvncserver.spec @@ -1,10 +1,14 @@ # Fedora pkg review: http://bugzilla.redhat.com/429749 +%if 0%{?fedora} +%define system_minilzo 1 +%endif + Summary: Library to make writing a vnc server easy Name: libvncserver Version: 0.9.7 -Release: 1%{?dist} +Release: 2%{?dist} # NOTE: --with-tightvnc-filetransfer => GPLv2 License: GPLv2+ Group: System Environment/Libraries @@ -15,6 +19,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch1: libvncserver-0.9.7-system_minilzo.patch Patch2: libvncserver-0.9.1-multilib.patch +# safer LINUX platform detection (from opensuse) +Patch50: libvncserver-LINUX.patch + # upstream name Obsoletes: LibVNCServer < %{version}-%{release} Provides: LibVNCServer = %{version}-%{release} @@ -22,7 +29,7 @@ Provides: LibVNCServer = %{version}-%{release} BuildRequires: findutils BuildRequires: libjpeg-devel BuildRequires: zlib-devel -BuildRequires: lzo-minilzo lzo-devel +%{?system_minilzo:BuildRequires: lzo-minilzo lzo-devel} %description LibVNCServer makes writing a VNC server (or more correctly, a program @@ -47,11 +54,14 @@ Provides: LibVNCServer-devel = %{version}-%{release} %prep %setup -q -n LibVNCServer-%{version} +%if 0%{?system_minilzo} %patch1 -p1 -b .system_minilzo #nuke bundled minilzo find . -name minilzo\* -exec rm -f {} \; +%endif %patch2 -p1 -b .multilib +%patch50 -p0 -b .LINUX # fix encoding mv AUTHORS AUTHORS.OLD && \ @@ -70,7 +80,7 @@ find -name "*.c" -o -name "*.h" | xargs chmod 644 # hack to omit unused-direct-shlib-dependencies sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool -make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -I %{_includedir}/lzo" LDFLAGS="$LDFLAGS -lminilzo" +make %{?_smp_mflags} %{?system_minilzo:CFLAGS="$RPM_OPT_FLAGS -I %{_includedir}/lzo" LDFLAGS="$LDFLAGS -lminilzo"} %install @@ -108,6 +118,9 @@ rm -rf %{buildroot} %changelog +* Mon May 04 2009 Rex Dieter - 0.9.7-2 +- fix detection of LINUX platform/define + * Mon May 04 2009 Rex Dieter - 0.9.7-1 - LibVNCServer-0.9.7