aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/packages/rpm/el5/SOURCES/FindX11.cmake57
-rw-r--r--contrib/packages/rpm/el5/SOURCES/tigervnc-static-fltk.patch22
-rw-r--r--contrib/packages/rpm/el5/SOURCES/tigervnc-x0vncserver-static-libs-fix.patch33
-rw-r--r--contrib/packages/rpm/el5/SOURCES/tigervnc14-static-build-fixes.patch139
-rw-r--r--contrib/packages/rpm/el5/SPECS/tigervnc.spec53
5 files changed, 189 insertions, 115 deletions
diff --git a/contrib/packages/rpm/el5/SOURCES/FindX11.cmake b/contrib/packages/rpm/el5/SOURCES/FindX11.cmake
index e8d70373..21cb7324 100644
--- a/contrib/packages/rpm/el5/SOURCES/FindX11.cmake
+++ b/contrib/packages/rpm/el5/SOURCES/FindX11.cmake
@@ -60,27 +60,26 @@ if (UNIX)
# found in tcl on the mac
set(CMAKE_FIND_FRAMEWORK_SAVE ${CMAKE_FIND_FRAMEWORK})
set(CMAKE_FIND_FRAMEWORK NEVER)
- if(NOT X11_INC_SEARCH_PATH)
- set(X11_INC_SEARCH_PATH
- /usr/pkg/xorg/include
- /usr/X11R6/include
- /usr/X11R7/include
- /usr/include/X11
- /usr/openwin/include
- /usr/openwin/share/include
- /opt/graphics/OpenGL/include
- )
- endif()
+ set(X11_INC_SEARCH_PATH
+ @_includedir@
+ /usr/pkg/xorg/include
+ /usr/X11R6/include
+ /usr/X11R7/include
+ /usr/include/X11
+ /usr/openwin/include
+ /usr/openwin/share/include
+ /opt/graphics/OpenGL/include
+ )
- if(NOT X11_LIB_SEARCH_PATH)
- set(X11_LIB_SEARCH_PATH
- /usr/pkg/xorg/lib
- /usr/X11R6/lib
- /usr/X11R7/lib
- /usr/openwin/lib
- )
- endif()
+ set(X11_LIB_SEARCH_PATH
+ @_libdir@
+ @_libdir@/tigervnc
+ /usr/pkg/xorg/lib
+ /usr/X11R6/lib
+ /usr/X11R7/lib
+ /usr/openwin/lib
+ )
find_path(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH})
find_path(X11_Xlib_INCLUDE_PATH X11/Xlib.h ${X11_INC_SEARCH_PATH})
@@ -181,7 +180,7 @@ if (UNIX)
set(X11_LIBRARIES) # start with empty list
if(X11_X11_LIB)
- set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB})
+ set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB} ${X11_xcb_LIB})
endif()
if(X11_Xext_LIB)
@@ -205,15 +204,13 @@ if (UNIX)
if (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
set(X11_Xau_FOUND TRUE)
+ set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xau_LIB})
endif ()
if (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
set(X11_Xdmcp_FOUND TRUE)
set(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdmcp_INCLUDE_PATH})
set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xdmcp_LIB})
- if (X11_Xau_FOUND)
- set(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xau_LIB})
- endif ()
endif ()
if (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
@@ -359,7 +356,7 @@ if (UNIX)
if($ENV{ISC} MATCHES "^yes$")
set(X11_X_EXTRA_LIBS -lnsl_s -linet)
else()
- set(X11_X_EXTRA_LIBS "")
+ set(X11_X_EXTRA_LIBS "-Wl,-Bdynamic -ldl")
# See if XOpenDisplay in X11 works by itself.
CHECK_LIBRARY_EXISTS("${X11_LIBRARIES}" "XOpenDisplay" "${X11_LIBRARY_DIR}" X11_LIB_X11_SOLO)
@@ -429,18 +426,6 @@ if (UNIX)
endif()
endif ()
- if (X11_Xdmcp_FOUND)
- set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} ${X11_Xdmcp_LIB})
- endif ()
-
- if (X11_Xau_FOUND)
- set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} ${X11_Xau_LIB})
- endif ()
-
- if (X11_xcb_FOUND)
- set (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} ${X11_xcb_LIB})
- endif ()
-
# Build the final list of libraries.
set(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS})
diff --git a/contrib/packages/rpm/el5/SOURCES/tigervnc-static-fltk.patch b/contrib/packages/rpm/el5/SOURCES/tigervnc-static-fltk.patch
deleted file mode 100644
index 3ad5d939..00000000
--- a/contrib/packages/rpm/el5/SOURCES/tigervnc-static-fltk.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/cmake/StaticBuild.cmake 2014-10-29 20:23:24.000000000 -0400
-+++ b/cmake/StaticBuild.cmake 2014-10-29 20:24:05.000000000 -0400
-@@ -68,7 +68,7 @@
- endif()
-
- if(FLTK_FOUND)
-- set(FLTK_LIBRARIES "-Wl,-Bstatic -lfltk_images -lpng -ljpeg -lfltk -Wl,-Bdynamic")
-+ set(FLTK_LIBRARIES "-Wl,-Bstatic -L${FLTK_LIBRARY_DIR} -lfltk_images -lpng -ljpeg -lfltk -Wl,-Bdynamic")
-
- if(WIN32)
- set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lcomctl32")
---- a/vncviewer/CMakeLists.txt 2014-10-29 20:39:58.000000000 -0400
-+++ b/vncviewer/CMakeLists.txt 2014-10-29 21:01:31.000000000 -0400
-@@ -46,7 +46,7 @@
- add_executable(vncviewer ${VNCVIEWER_SOURCES})
- endif()
-
--target_link_libraries(vncviewer rfb network rdr os Xregion ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
-+target_link_libraries(vncviewer ${FLTK_LIBRARIES} rfb network rdr os Xregion -lxcb ${X11_Xdmcp_LIB} ${X11_Xau_LIB} ${GETTEXT_LIBRARIES})
-
- if(APPLE)
- target_link_libraries(vncviewer "-framework Cocoa" "-framework Carbon")
diff --git a/contrib/packages/rpm/el5/SOURCES/tigervnc-x0vncserver-static-libs-fix.patch b/contrib/packages/rpm/el5/SOURCES/tigervnc-x0vncserver-static-libs-fix.patch
deleted file mode 100644
index 75449560..00000000
--- a/contrib/packages/rpm/el5/SOURCES/tigervnc-x0vncserver-static-libs-fix.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/unix/x0vncserver/CMakeLists.txt 2014-10-29 18:25:30.000000000 -0400
-+++ b/unix/x0vncserver/CMakeLists.txt 2014-10-29 18:26:38.000000000 -0400
-@@ -31,7 +31,7 @@
- message(WARNING "No DAMAGE extension. x0vncserver will have to use the slower polling method.")
- endif()
-
--target_link_libraries(x0vncserver ${X11_LIBRARIES})
-+target_link_libraries(x0vncserver ${X11_LIBRARIES} -lxcb ${X11_Xdmcp_LIB} ${X11_Xau_LIB} -ldl)
-
- install(TARGETS x0vncserver DESTINATION ${BIN_DIR})
- install(FILES x0vncserver.man DESTINATION ${MAN_DIR}/man1 RENAME x0vncserver.1)
---- a/unix/vncconfig/CMakeLists.txt 2014-10-29 18:45:41.000000000 -0400
-+++ b/unix/vncconfig/CMakeLists.txt 2014-10-29 18:46:17.000000000 -0400
-@@ -9,7 +9,7 @@
- vncconfig.cxx
- QueryConnectDialog.cxx)
-
--target_link_libraries(vncconfig tx rfb network rdr ${X11_LIBRARIES})
-+target_link_libraries(vncconfig tx rfb network rdr ${X11_LIBRARIES} -lxcb ${X11_Xdmcp_LIB} ${X11_Xau_LIB} -ldl)
-
- install(TARGETS vncconfig DESTINATION ${BIN_DIR})
- install(FILES vncconfig.man DESTINATION ${MAN_DIR}/man1 RENAME vncconfig.1)
---- a/vncviewer/CMakeLists.txt 2014-12-19 08:44:51.000000000 -0500
-+++ b/vncviewer/CMakeLists.txt 2014-12-19 08:45:03.000000000 -0500
-@@ -46,7 +46,7 @@
- add_executable(vncviewer ${VNCVIEWER_SOURCES})
- endif()
-
--target_link_libraries(vncviewer ${FLTK_LIBRARIES} rfb network rdr os Xregion -lxcb ${X11_Xdmcp_LIB} ${X11_Xau_LIB} ${GETTEXT_LIBRARIES})
-+target_link_libraries(vncviewer ${FLTK_LIBRARIES} rfb network rdr os Xregion -lxcb ${X11_Xdmcp_LIB} ${X11_Xau_LIB} ${GETTEXT_LIBRARIES} -ldl)
-
- if(APPLE)
- target_link_libraries(vncviewer "-framework Cocoa" "-framework Carbon")
diff --git a/contrib/packages/rpm/el5/SOURCES/tigervnc14-static-build-fixes.patch b/contrib/packages/rpm/el5/SOURCES/tigervnc14-static-build-fixes.patch
new file mode 100644
index 00000000..7cad24e8
--- /dev/null
+++ b/contrib/packages/rpm/el5/SOURCES/tigervnc14-static-build-fixes.patch
@@ -0,0 +1,139 @@
+--- a/cmake/StaticBuild.cmake 2014-12-25 23:28:45.000000000 -0500
++++ b/cmake/StaticBuild.cmake 2015-01-01 18:18:36.000000000 -0500
+@@ -82,10 +82,10 @@
+ if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+ set(FLTK_LIBRARIES "${FLTK_LIBRARIES} ${X11_Xcursor_LIB} ${X11_Xfixes_LIB} -Wl,-Bstatic -lXft -Wl,-Bdynamic -lfontconfig -lXext -R/usr/sfw/lib")
+ else()
+- set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -Wl,-Bstatic -lXcursor -lXfixes -lXft -lfontconfig -lexpat -lfreetype -lbz2 -lXrender -lXext -lXinerama -Wl,-Bdynamic")
++ set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -Wl,-Bstatic -lXft -lfontconfig -lfreetype -lXcursor -lXfixes -lz -lbz2 -lXrender -lXinerama -lXext -lexpat -Wl,-Bdynamic")
+ endif()
+
+- set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -lX11")
++ set(FLTK_LIBRARIES "${FLTK_LIBRARIES} -Wl,-Bstatic -lX11 -lxcb -lXdmcp -lXau -lICE -Wl,-Bdynamic -ldl")
+ endif()
+ endif()
+
+@@ -93,7 +93,7 @@
+ # them statically, even libXext. libX11 is somewhat stable, although
+ # even it has had an ABI change once or twice.
+ if(X11_FOUND AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+- set(X11_LIBRARIES "-Wl,-Bstatic -lXext -Wl,-Bdynamic -lX11")
++ set(X11_LIBRARIES "-Wl,-Bstatic -lXext -lX11 -lxcb -lXdmcp -lXau -lICE -Wl,-Bdynamic -ldl -lpthread")
+ if(X11_XTest_LIB)
+ set(X11_XTest_LIB "-Wl,-Bstatic -lXtst -Wl,-Bdynamic")
+ endif()
+--- a/vncviewer/CMakeLists.txt 2014-11-04 21:38:36.000000000 -0500
++++ b/vncviewer/CMakeLists.txt 2015-01-01 18:15:32.000000000 -0500
+@@ -46,7 +46,7 @@
+ add_executable(vncviewer ${VNCVIEWER_SOURCES})
+ endif()
+
+-target_link_libraries(vncviewer rfb network rdr os Xregion ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
++target_link_libraries(vncviewer ${FLTK_LIBRARIES} rfb network rdr os Xregion ${GETTEXT_LIBRARIES})
+
+ if(APPLE)
+ target_link_libraries(vncviewer "-framework Cocoa" "-framework Carbon")
+--- a/CMakeLists.txt 2014-12-26 15:16:04.000000000 -0500
++++ b/CMakeLists.txt 2015-01-01 23:00:40.000000000 -0500
+@@ -203,6 +203,41 @@
+ add_subdirectory(java)
+ endif()
+
++# Check for GNUTLS library
++option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication" ON)
++if(ENABLE_GNUTLS)
++ find_package(GnuTLS)
++ if (GNUTLS_FOUND)
++ include_directories(${GNUTLS_INCLUDE_DIR})
++ add_definitions("-DHAVE_GNUTLS")
++ add_definitions(${GNUTLS_DEFINITIONS})
++
++ # Detect old version of GnuTLS
++ set(CMAKE_REQUIRED_FLAGS -I${GNUTLS_INCLUDE_DIR})
++ set(CMAKE_EXTRA_INCLUDE_FILES gnutls/gnutls.h)
++ set(CMAKE_REQUIRED_LIBRARIES ${GNUTLS_LIBRARIES})
++ if(WIN32)
++ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ws2_32 user32)
++ endif()
++ if(ZLIB_FOUND)
++ # When we build against the static version of GnuTLS, we also use the
++ # included version of Zlib, but it isn't built yet, so we have to use the
++ # system's version (if available) to perform this test.
++ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES};-lz)
++ endif()
++ check_function_exists(gnutls_transport_set_errno HAVE_GNUTLS_SET_ERRNO)
++ check_function_exists(gnutls_transport_set_global_errno HAVE_GNUTLS_SET_GLOBAL_ERRNO)
++ check_function_exists(gnutls_x509_crt_print HAVE_GNUTLS_X509_CRT_PRINT)
++ check_type_size(gnutls_x509_crt_t GNUTLS_X509_CRT_T)
++ check_type_size(gnutls_datum_t GNUTLS_DATUM_T)
++ check_type_size(gnutls_pk_algorithm_t GNUTLS_PK_ALGORITHM_T)
++ check_type_size(gnutls_sign_algorithm_t GNUTLS_SIGN_ALGORITHM_T)
++ set(CMAKE_REQUIRED_FLAGS)
++ set(CMAKE_EXTRA_INCLUDE_FILES)
++ set(CMAKE_REQUIRED_LIBRARIES)
++ endif()
++endif()
++
+ # Check for FLTK
+ set(FLTK_SKIP_FLUID TRUE)
+ set(FLTK_SKIP_OPENGL TRUE)
+@@ -228,6 +263,8 @@
+ endif()
+ endif()
+
++include(cmake/StaticBuild.cmake)
++
+ if(FLTK_FOUND)
+ set(CMAKE_REQUIRED_INCLUDES ${FLTK_INCLUDE_DIR})
+ set(CMAKE_REQUIRED_LIBRARIES ${FLTK_LIBRARIES})
+@@ -263,41 +300,6 @@
+ set(CMAKE_REQUIRED_LIBRARIES)
+ endif()
+
+-# Check for GNUTLS library
+-option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication" ON)
+-if(ENABLE_GNUTLS)
+- find_package(GnuTLS)
+- if (GNUTLS_FOUND)
+- include_directories(${GNUTLS_INCLUDE_DIR})
+- add_definitions("-DHAVE_GNUTLS")
+- add_definitions(${GNUTLS_DEFINITIONS})
+-
+- # Detect old version of GnuTLS
+- set(CMAKE_REQUIRED_FLAGS -I${GNUTLS_INCLUDE_DIR})
+- set(CMAKE_EXTRA_INCLUDE_FILES gnutls/gnutls.h)
+- set(CMAKE_REQUIRED_LIBRARIES ${GNUTLS_LIBRARIES})
+- if(WIN32)
+- set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ws2_32 user32)
+- endif()
+- if(ZLIB_FOUND)
+- # When we build against the static version of GnuTLS, we also use the
+- # included version of Zlib, but it isn't built yet, so we have to use the
+- # system's version (if available) to perform this test.
+- set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES};-lz)
+- endif()
+- check_function_exists(gnutls_transport_set_errno HAVE_GNUTLS_SET_ERRNO)
+- check_function_exists(gnutls_transport_set_global_errno HAVE_GNUTLS_SET_GLOBAL_ERRNO)
+- check_function_exists(gnutls_x509_crt_print HAVE_GNUTLS_X509_CRT_PRINT)
+- check_type_size(gnutls_x509_crt_t GNUTLS_X509_CRT_T)
+- check_type_size(gnutls_datum_t GNUTLS_DATUM_T)
+- check_type_size(gnutls_pk_algorithm_t GNUTLS_PK_ALGORITHM_T)
+- check_type_size(gnutls_sign_algorithm_t GNUTLS_SIGN_ALGORITHM_T)
+- set(CMAKE_REQUIRED_FLAGS)
+- set(CMAKE_EXTRA_INCLUDE_FILES)
+- set(CMAKE_REQUIRED_LIBRARIES)
+- endif()
+-endif()
+-
+ # Check for PAM library
+ option(ENABLE_PAM "Enable PAM authentication support" ON)
+ if(ENABLE_PAM)
+@@ -330,8 +332,6 @@
+ add_definitions(-DHAVE_CONFIG_H)
+ include_directories(${CMAKE_BINARY_DIR})
+
+-include(cmake/StaticBuild.cmake)
+-
+ add_subdirectory(common)
+
+ if(WIN32)
diff --git a/contrib/packages/rpm/el5/SPECS/tigervnc.spec b/contrib/packages/rpm/el5/SPECS/tigervnc.spec
index 9914b570..6ef7f6f7 100644
--- a/contrib/packages/rpm/el5/SPECS/tigervnc.spec
+++ b/contrib/packages/rpm/el5/SPECS/tigervnc.spec
@@ -1,9 +1,11 @@
%define _default_patch_fuzz 2
+%define tigervnc_src_dir %{_builddir}/%{name}-%{version}%{?snap:-%{snap}}
+%define xorg_buildroot %{tigervnc_src_dir}/xorg.build
%{!?_self_signed: %define _self_signed 1}
Name: tigervnc
Version: @VERSION@
-Release: 1%{?snap:.%{snap}}%{?dist}
+Release: 2%{?snap:.%{snap}}%{?dist}
Summary: A TigerVNC remote display system
Group: User Interface/Desktops
@@ -128,8 +130,7 @@ Obsoletes: tightvnc < 1.5.0-0.15.20090204svn3586
Patch4: tigervnc-cookie.patch
Patch10: tigervnc11-ldnow.patch
Patch11: tigervnc11-gethomedir.patch
-Patch14: tigervnc-x0vncserver-static-libs-fix.patch
-Patch15: tigervnc-static-fltk.patch
+Patch12: tigervnc14-static-build-fixes.patch
# fltk patches
Patch124: fltk-1.3.2-libdl.patch
@@ -262,12 +263,14 @@ This package contains icons for TigerVNC viewer
rm -rf %{_builddir}/%{name}-%{version}%{?snap:-%{snap}}
%setup -q -n %{name}-%{version}%{?snap:-%{snap}}
+# Search paths for X11 are hard coded into FindX11.cmake
cp %SOURCE9 cmake/Modules/
+sed -i -e "s#@_includedir@#%{xorg_buildroot}%{_includedir}#" cmake/Modules/FindX11.cmake
+sed -i -e "s#@_libdir@#%{xorg_buildroot}%{_libdir}#" cmake/Modules/FindX11.cmake
%patch4 -p1 -b .cookie
%patch10 -p1 -b .ldnow
%patch11 -p1 -b .gethomedir
-%patch15 -p1 -b .static-fltk
-%patch14 -p1 -b .x0vncserver
+%patch12 -p1 -b .static-build-fixes
tar xzf %SOURCE11
pushd fltk-*
@@ -275,7 +278,10 @@ for p in `find ../contrib/fltk -maxdepth 1 -type f -name "*.patch"|sort` ;
do
patch -p1 -i $p
done
+# Search paths for X11 are hard coded into FindX11.cmake
cp %SOURCE9 CMake/
+sed -i -e "s#@_includedir@#%{xorg_buildroot}%{_includedir}#" CMake/FindX11.cmake
+sed -i -e "s#@_libdir@#%{xorg_buildroot}%{_libdir}#" CMake/FindX11.cmake
%patch124 -p1 -b .libdl
%patch125 -p1 -b .static-libs
popd
@@ -408,20 +414,21 @@ patch -p1 < %{_builddir}/%{name}-%{version}%{?snap:-%{snap}}/unix/xserver112.pat
popd
%build
-%define tigervnc_src_dir %{_builddir}/%{name}-%{version}%{?snap:-%{snap}}
export CC=gcc44
export CXX=g++44
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CXXFLAGS="$CFLAGS -static-libgcc"
export PYTHON=python26
-%define xorg_buildroot %{tigervnc_src_dir}/xorg.build
mkdir -p %{xorg_buildroot}%{_libdir}
pushd %{xorg_buildroot}%{_libdir}
-ln -s `g++44 -print-file-name=libstdc++.a`
ln -s `g++44 -print-file-name=libz.a`
ln -s `g++44 -print-file-name=libgcc.a`
ln -s `g++44 -print-file-name=libexpat.a`
+ln -s `g++44 -print-file-name=libgnutls.a`
+ln -s `g++44 -print-file-name=libgpg-error.a`
+ln -s `g++44 -print-file-name=libgcrypt.a`
+ln -s `g++44 -print-file-name=libcrypto.a`
popd
echo "*** Building libjpeg-turbo ***"
@@ -446,9 +453,9 @@ popd
export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{xorg_buildroot}%{_includedir}"
export CXXFLAGS="$RPM_OPT_FLAGS -fPIC -I%{xorg_buildroot}%{_includedir} -static-libgcc"
export CPPFLAGS=$CXXFLAGS
-export LDFLAGS="$LDFLAGS -L%{xorg_buildroot}%{_libdir}"
+export LDFLAGS="$LDFLAGS -L%{xorg_buildroot}%{_libdir} -L%{xorg_buildroot}%{_libdir}/tigervnc"
export ACLOCAL="aclocal -I %{xorg_buildroot}%{_datadir}/aclocal"
-export PKG_CONFIG_PATH="%{xorg_buildroot}%{_libdir}/pkgconfig:%{xorg_buildroot}%{_libdir}/tigervnc/pkgconfig:%{xorg_buildroot}%{_datadir}/pkgconfig"
+export PKG_CONFIG_PATH="%{xorg_buildroot}%{_libdir}/pkgconfig:%{xorg_buildroot}%{_libdir}/tigervnc/pkgconfig:%{xorg_buildroot}%{_datadir}/pkgconfig:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig"
echo "*** Building freetype ***"
pushd freetype-*
@@ -490,7 +497,7 @@ popd
echo "*** Building fontconfig ***"
pushd fontconfig-*
autoreconf -fiv
-LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" HASDOCBOOK=no ./configure --prefix=%{_prefix} --libdir=%{_libdir} --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/OTF --enable-static --disable-shared
+LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" HASDOCBOOK=no ./configure --prefix=%{_prefix} --libdir=%{_libdir} --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/OTF --enable-static --disable-shared --with-confdir=%{_sysconfdir}/fonts --with-cache-dir=%{_localstatedir}/cache/fontconfig --with-default-fonts=%{_datadir}/fonts --with-add-fonts="%{_datadir}/X11/fonts/Type1,%{_datadir}/X11/fonts/OTF,%{_datadir}/X11/fonts/TTF,%{_prefix}/local/share/fonts,~/.fonts"
make %{?_smp_mflags}
make DESTDIR=%{xorg_buildroot} install
find %{xorg_buildroot}%{_prefix} -type f -name "*.la" -delete
@@ -665,7 +672,6 @@ export PYTHON2=python26
%ifarch %{ix86}
sed -i -e 's/-std=c99/-std=gnu99/g' configure.ac
%endif
-sed -i 's/^default_driver.*$/default_driver="dri"/' configure.ac
autoreconf -fiv
%ifarch %{ix86}
# i do not have words for how much the assembly dispatch code infuriates me
@@ -704,30 +710,29 @@ popd
echo "*** Building fltk ***"
pushd fltk-*
export CMAKE_PREFIX_PATH="%{xorg_buildroot}%{_prefix}:%{_prefix}"
-export CMAKE_EXE_LINKER_FLAGS="-static-libgcc -L%{xorg_buildroot}%{_libdir}"
-export LDFLAGS="$LDFLAGS -static"
+export CMAKE_EXE_LINKER_FLAGS=$LDFLAGS
export PKG_CONFIG="pkg-config --static"
%{cmake28} -G"Unix Makefiles" \
- -DCMAKE_INSTALL_PREFIX=%{xorg_buildroot}%{_prefix} \
- -DX11_INC_SEARCH_PATH=%{xorg_buildroot}%{_includedir} \
- -DX11_LIB_SEARCH_PATH=%{xorg_buildroot}%{_libdir} \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DOPTION_PREFIX_LIB=%{_libdir} \
-DCMAKE_BUILD_TYPE=Release \
-DOPTION_USE_THREADS=off \
-DOPTION_BUILD_EXAMPLES=off \
- -DOPTION_USE_SYSTEM_LIBPNG=on
+ -DOPTION_USE_SYSTEM_LIBPNG=on \
+ -DPNG_LIBRARY=%{_libdir}/libpng.a \
+ -DPNG_INCLUDE_DIR=%{_includedir} \
+ -DOPTION_USE_GL=off
make %{?_smp_mflags}
+make DESTDIR=%{xorg_buildroot} install
popd
echo "*** Building VNC ***"
export CFLAGS="$CFLAGS -fPIC"
export CXXFLAGS=`echo $CXXFLAGS | sed -e 's/ -c //g'`
%{cmake28} -G"Unix Makefiles" \
- -DX11_INC_SEARCH_PATH=%{xorg_buildroot}%{_includedir} \
- -DX11_LIB_SEARCH_PATH=%{xorg_buildroot}%{_libdir} \
- -DFLTK_LIBRARY_DIR=%{tigervnc_src_dir}/fltk-1.3.2/lib \
- -DFLTK_LIBRARIES="%{tigervnc_src_dir}/fltk-1.3.2/lib/libfltk.a;%{tigervnc_src_dir}/fltk-1.3.2/lib/libfltk_images.a;-lpng;" \
- -DFLTK_FLUID_EXECUTABLE=%{tigervnc_src_dir}/fltk-1.3.2/bin/fluid \
- -DFLTK_INCLUDE_DIR=%{tigervnc_src_dir}/fltk-1.3.2 \
+ -DFLTK_FLUID_EXECUTABLE=%{xorg_buildroot}%{_bindir}/fluid \
+ -DFLTK_LIBRARY_DIR=%{xorg_buildroot}%{_libdir} \
+ -DFLTK_INCLUDE_DIR=%{xorg_buildroot}%{_includedir} \
-DBUILD_STATIC=1 \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_INCLUDED_ZLIB=0 \