Major update to libproxy-0.4.6.

Several patches from the FreeBSD port.

Create -mozilla and -webkit subpackages. Do NOT build -webkit by default
because of a cyclic dependency:
libproxy,-webkit -> webkit -> libsoup -> libproxy

tested in a bulk by landry@
ok landry@
This commit is contained in:
ajacoutot 2011-03-24 06:50:09 +00:00
parent 79767e6967
commit 518ac6d7b6
20 changed files with 202 additions and 162 deletions

View File

@ -1,20 +1,26 @@
# $OpenBSD: Makefile,v 1.9 2010/11/19 22:31:34 espie Exp $
# $OpenBSD: Makefile,v 1.10 2011/03/24 06:50:09 ajacoutot Exp $
SHARED_ONLY= Yes
SHARED_ONLY= Yes
COMMENT-main= library handling all the details of proxy configuration
COMMENT-gnome= plugin for GNOME
COMMENT-main= library handling all the details of proxy configuration
COMMENT-gnome= plugin for GNOME
COMMENT-mozilla= plugin for mozilla-based (gecko) browsers
COMMENT-webkit= plugin for webkit-based browsers
VERSION= 0.2.3
DISTNAME= libproxy-${VERSION}
PKGNAME-main= libproxy-${VERSION}
PKGNAME-gnome= libproxy-gnome-${VERSION}
REVISION-main= 2
REVISION-gnome= 1
SHARED_LIBS += proxy 0.0 # .0.0
CATEGORIES= net
VERSION= 0.4.6
DISTNAME= libproxy-${VERSION}
HOMEPAGE= http://libproxy.googlecode.com/
PKGNAME-main= libproxy-${VERSION}
PKGNAME-gnome= libproxy-gnome-${VERSION}
PKGNAME-mozilla= libproxy-mozilla-${VERSION}
PKGNAME-webkit= libproxy-webkit-${VERSION}
CATEGORIES= net
SHARED_LIBS += modman 0.0 # 1.0
SHARED_LIBS += proxy 1.0 # 0.0
HOMEPAGE= http://libproxy.googlecode.com/
# LGPLv2.1
PERMIT_PACKAGE_CDROM= Yes
@ -24,31 +30,74 @@ PERMIT_DISTFILES_FTP= Yes
MASTER_SITES= ${HOMEPAGE}/files/
MODULES= lang/python
# order matters: cmake must come before python
MODULES= devel/cmake \
lang/python
USE_LIBTOOL= Yes
LIBTOOL_FLAGS= --tag=disable-static
USE_GMAKE= Yes
# do not enable webkit support by default because of cyclic dependency:
# libproxy,-webkit -> webkit -> libsoup -> libproxy
PSEUDO_FLAVORS= webkit
FLAVOR?=
MULTI_PACKAGES= -main -gnome
MULTI_PACKAGES= -main -gnome -mozilla
LIB_DEPENDS-gnome= ${BUILD_PKGPATH},-main \
BUILD_DEPENDS= devel/xulrunner/1.9,-devel>=1.9.1 \
lang/vala
RUN_DEPENDS-main= ${MODPY_RUN_DEPENDS}
RUN_DEPENDS-gnome= ${MODGETTEXT_RUN_DEPENDS}
LIB_DEPENDS-gnome= ${BUILD_PKGPATH}>=${VERSION} \
devel/gconf2
WANTLIB-main= ICE SM X11 Xau Xdmcp Xext Xmu Xt c m pthread \
pthread-stubs xcb
RUN_DEPENDS-mozilla= # empty
LIB_DEPENDS-mozilla= ${BUILD_PKGPATH}>=${VERSION} \
devel/xulrunner/1.9 \
devel/nspr
WANTLIB-gnome = ICE ORBit-2 SM X11 Xau Xdmcp Xext Xmu Xt dbus-1 \
dbus-glib-1 glib-2.0 gmodule-2.0 gobject-2.0 \
gthread-2.0 iconv intl m pcre pthread-stubs xcb \
proxy gconf-2
RUN_DEPENDS-webkit= ${MODGETTEXT_RUN_DEPENDS}
LIB_DEPENDS-webkit= STEM->=${VERSION}:${BUILD_PKGPATH}, \
www/webkit
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--without-mozjs \
--without-webkit
cWANTLIB += m pthread stdc++
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib -pthread"
WANTLIB-main += ${cWANTLIB} c perl
WANTLIB-gnome += ${cWANTLIB} ${MODGETTEXT_WANTLIB}
WANTLIB-gnome += ORBit-2 c gconf-2 gio-2.0 glib-2.0 gmodule-2.0
WANTLIB-gnome += gobject-2.0 gthread-2.0 modman proxy
WANTLIB-mozilla += ${cWANTLIB} c modman nspr4 plc4 plds4 proxy
WANTLIB-webkit += ${cWANTLIB} ${MODGETTEXT_WANTLIB}
WANTLIB-webkit += GL X11 Xau Xcomposite Xcursor Xdamage Xdmcp Xext Xfixes
WANTLIB-webkit += Xi Xinerama Xrandr Xrender Xxf86vm atk-1.0 cairo drm
WANTLIB-webkit += expat fontconfig freetype gdk-x11-2.0 gdk_pixbuf-2.0
WANTLIB-webkit += gio-2.0 glib-2.0 gmodule-2.0 gnutls gobject-2.0 gthread-2.0
WANTLIB-webkit += gtk-x11-2.0 modman pango-1.0 pangocairo-1.0
WANTLIB-webkit += pangoft2-1.0 pixman-1 png proxy pthread-stubs soup-2.4
WANTLIB-webkit += tasn1 webkit-1.0 xcb xcb-render xcb-shm xml2 z
CONFIGURE_ARGS= -DCMAKE_C_FLAGS="${CFLAGS} -pthread" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -pthread" \
-DWITH_PYTHON:BOOL=ON \
-DWITH_PERL:BOOL=ON \
-DWITH_GNOME:BOOL=ON \
-DWITH_MOZJS:BOOL=ON \
-DWITH_VALA:BOOL=ON \
-DWITH_KDE4:BOOL=OFF \
-DWITH_DOTNET:BOOL=OFF \
-DWITH_NM:BOOL=OFF
.if ${FLAVOR:L:Mwebkit}
MULTI_PACKAGES += -webkit
CONFIGURE_ARGS += -DWITH_WEBKIT:BOOL=ON
.else
CONFIGURE_ARGS += -DWITH_WEBKIT:BOOL=OFF
.endif
pre-configure:
${SUBST_CMD} ${WRKSRC}/libproxy/cmake/libproxy.cmk \
${WRKSRC}/libmodman/CMakeLists.txt
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
MD5 (libproxy-0.2.3.tar.gz) = hrY14estZlz770xhNP5mBA==
RMD160 (libproxy-0.2.3.tar.gz) = yGxPhAPLh5OA4QHQdK9GnJYLXBw=
SHA1 (libproxy-0.2.3.tar.gz) = KysAoXl0BUgDWhFFu65gDbmwos4=
SHA256 (libproxy-0.2.3.tar.gz) = Wd7RYLNUfSnjfMnQY1n3832UESIU5FMkMM1l5wTBM5o=
SIZE (libproxy-0.2.3.tar.gz) = 378773
MD5 (libproxy-0.4.6.tar.gz) = GZxrEguvH3JYpV841ex09Q==
RMD160 (libproxy-0.4.6.tar.gz) = 9fA8hK0th/5yiGn63GaWKHN8Y54=
SHA1 (libproxy-0.4.6.tar.gz) = bpdFyHt3TzS/U/B6VChMDXICDpQ=
SHA256 (libproxy-0.4.6.tar.gz) = mtkS5jse/KmPtEIkCivHMC5gIcHQsbk2MydynylGLzA=
SIZE (libproxy-0.4.6.tar.gz) = 82483

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-configure,v 1.1.1.1 2009/04/04 10:07:31 landry Exp $
--- configure.orig Thu Jun 5 22:56:33 2008
+++ configure Tue Feb 3 11:05:33 2009
@@ -21840,10 +21840,6 @@ _ACEOF
esac
-cat >>confdefs.h <<\_ACEOF
-#define malloc rpl_malloc
-_ACEOF
-
fi

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-libmodman_CMakeLists_txt,v 1.1 2011/03/24 06:50:09 ajacoutot Exp $
--- libmodman/CMakeLists.txt.orig Wed Sep 1 22:23:34 2010
+++ libmodman/CMakeLists.txt Tue Mar 22 09:36:04 2011
@@ -12,9 +12,9 @@ add_library(modman SHARED
module_manager.hpp
module_manager.cpp)
if(NOT WIN32)
- target_link_libraries(modman dl)
+ target_link_libraries(modman)
endif()
-set_target_properties(modman PROPERTIES PREFIX "lib" VERSION 1.0.0 SOVERSION 1)
+set_target_properties(modman PROPERTIES PREFIX "lib" VERSION ${LIBmodman_VERSION})
install(TARGETS modman DESTINATION ${LIB_INSTALL_DIR})
### Tests

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-libproxy_CMakeLists_txt,v 1.1 2011/03/24 06:50:09 ajacoutot Exp $
error: '::wcstof' has not been declared
--- libproxy/CMakeLists.txt.orig Tue Mar 22 09:13:30 2011
+++ libproxy/CMakeLists.txt Tue Mar 22 09:13:36 2011
@@ -6,7 +6,7 @@ set_project_version(0 4 6)
if (WIN32)
add_definitions(-D_CRT_SECURE_NO_WARNINGS=1)
else(WIN32)
- add_definitions(-D_POSIX_C_SOURCE=1)
+# add_definitions(-D_POSIX_C_SOURCE=1)
set(CMAKE_CXX_FLAGS "-fvisibility=hidden ${CMAKE_CXX_FLAGS}")
endif(WIN32)

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-libproxy_cmake_libproxy_cmk,v 1.1 2011/03/24 06:50:09 ajacoutot Exp $
--- libproxy/cmake/libproxy.cmk.orig Wed Sep 1 22:23:34 2010
+++ libproxy/cmake/libproxy.cmk Tue Mar 22 09:35:32 2011
@@ -2,7 +2,7 @@ add_library(libproxy SHARED extension_config.cpp exten
if(WIN32)
target_link_libraries(libproxy modman;ws2_32;${LIBPROXY_LIBRARIES})
else()
- target_link_libraries(libproxy modman;m;pthread;dl;${LIBPROXY_LIBRARIES})
+ target_link_libraries(libproxy modman;m;pthread;${LIBPROXY_LIBRARIES})
endif()
file(TO_NATIVE_PATH ${MODULE_INSTALL_DIR} MODULE_INSTALL_DIR)
if(WIN32)
@@ -17,6 +17,6 @@ endif()
set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/proxy.cpp
PROPERTY COMPILE_DEFINITIONS MODULEDIR="${MODULEDIR}";BUILTIN_MODULES=${BUILTIN_MODULES})
-set_target_properties(libproxy PROPERTIES PREFIX "" VERSION 1.0.0 SOVERSION 1)
+set_target_properties(libproxy PROPERTIES PREFIX "" VERSION ${LIBproxy_VERSION})
install(TARGETS libproxy DESTINATION ${LIB_INSTALL_DIR})
install(FILES proxy.h DESTINATION ${INCLUDE_INSTALL_DIR})

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-libproxy_cmake_modules_cmk,v 1.1 2011/03/24 06:50:09 ajacoutot Exp $
--- libproxy/cmake/modules.cmk.orig Tue Mar 22 11:03:08 2011
+++ libproxy/cmake/modules.cmk Tue Mar 22 11:05:20 2011
@@ -17,10 +17,10 @@ include(cmake/modules/pacrunner_mozjs.cmk)
include(cmake/modules/pacrunner_webkit.cmk)
# Build the pacrunner into libproxy unless we are building for multiple engines
-set(BIPR 1)
-if(MOZJS_FOUND AND WEBKIT_FOUND)
+#set(BIPR 1)
+#if(MOZJS_FOUND AND WEBKIT_FOUND)
set(BIPR 0)
-endif()
+#endif()
#
## Module definition

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libproxy_proxy_cpp,v 1.1 2011/03/24 06:50:09 ajacoutot Exp $
--- libproxy/proxy.cpp.orig Tue Mar 22 09:24:47 2011
+++ libproxy/proxy.cpp Tue Mar 22 09:24:55 2011
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/
+#include <sys/types.h>
+
#include <vector>
#include <cstring> // For strdup()
#include <iostream> // For cerr

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libproxy_url_hpp,v 1.1 2011/03/24 06:50:09 ajacoutot Exp $
--- libproxy/url.hpp.orig Tue Mar 22 09:25:28 2011
+++ libproxy/url.hpp Tue Mar 22 09:25:34 2011
@@ -20,6 +20,8 @@
#ifndef URL_HPP_
#define URL_HPP_
+#include <sys/types.h>
+
#include <map>
#include <stdexcept>
#include <string>

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_bin_Makefile_in,v 1.1.1.1 2009/04/04 10:07:31 landry Exp $
--- src/bin/Makefile.in.orig Tue Feb 3 10:40:04 2009
+++ src/bin/Makefile.in Tue Feb 3 10:40:14 2009
@@ -210,7 +210,7 @@ xmu_LIBS = @xmu_LIBS@
# Command line interface to libproxy
proxy_SOURCES = proxy.c
proxy_CFLAGS = -I$(top_srcdir)/src/lib
-proxy_LDFLAGS = -ldl
+proxy_LDFLAGS =
proxy_LDADD = ../lib/libproxy.la
all: all-am

View File

@ -1,25 +0,0 @@
$OpenBSD: patch-src_lib_proxy_factory_c,v 1.1.1.1 2009/04/04 10:07:31 landry Exp $
--- src/lib/proxy_factory.c.orig Tue Feb 3 10:32:47 2009
+++ src/lib/proxy_factory.c Tue Feb 3 10:33:07 2009
@@ -17,16 +17,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+
#include <stdlib.h>
#include <assert.h>
#include <string.h>
-#include <sys/types.h>
#include <dirent.h>
#include <stdio.h>
#include <dlfcn.h>
#include <math.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
#include <pthread.h>

View File

@ -1,24 +0,0 @@
$OpenBSD: patch-src_lib_url_c,v 1.1.1.1 2009/04/04 10:07:31 landry Exp $
--- src/lib/url.c.orig Mon Feb 2 23:17:31 2009
+++ src/lib/url.c Tue Feb 3 10:33:11 2009
@@ -17,15 +17,17 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
#include <netdb.h>
+
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <arpa/inet.h>
#include "misc.h"
#include "url.h"

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_plugins_mozjs_c,v 1.1.1.1 2009/04/04 10:07:31 landry Exp $
--- src/plugins/mozjs.c.orig Tue Feb 3 10:37:21 2009
+++ src/plugins/mozjs.c Tue Feb 3 10:37:39 2009
@@ -17,12 +17,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/
-#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
-#include <netdb.h>
#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#include <stdlib.h>
+#include <string.h>
#define __USE_BSD
#include <unistd.h>

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_plugins_webkit_c,v 1.1.1.1 2009/04/04 10:07:31 landry Exp $
--- src/plugins/webkit.c.orig Tue Feb 3 10:34:19 2009
+++ src/plugins/webkit.c Tue Feb 3 10:34:53 2009
@@ -17,12 +17,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
******************************************************************************/
-#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
-#include <netdb.h>
#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <netdb.h>
+
+#include <stdlib.h>
+#include <string.h>
#define __USE_BSD
#include <unistd.h>

View File

@ -0,0 +1 @@
This package contains the libproxy plugin for mozilla-based browsers.

View File

@ -0,0 +1 @@
This package contains the libproxy plugin for webkit-based browsers.

View File

@ -1,2 +1,3 @@
@comment $OpenBSD: PLIST-gnome,v 1.1.1.1 2009/04/04 10:07:31 landry Exp $
lib/libproxy/0.2.3/plugins/gnome.so
@comment $OpenBSD: PLIST-gnome,v 1.2 2011/03/24 06:50:10 ajacoutot Exp $
lib/libproxy/0.4.6/modules/config_gnome.so
@bin libexec/pxgconf

View File

@ -1,13 +1,23 @@
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2009/04/04 10:07:31 landry Exp $
@comment $OpenBSD: PLIST-main,v 1.2 2011/03/24 06:50:10 ajacoutot Exp $
@bin bin/proxy
include/proxy.h
@lib lib/libmodman.so.${LIBmodman_VERSION}
lib/libproxy/
lib/libproxy.la
@lib lib/libproxy.so.${LIBproxy_VERSION}
lib/libproxy/0.2.3/
lib/libproxy/0.2.3/plugins/
lib/libproxy/0.2.3/plugins/envvar.so
lib/libproxy/0.2.3/plugins/file.so
lib/libproxy/0.2.3/plugins/kde.so
lib/libproxy/0.4.6/
lib/libproxy/0.4.6/modules/
lib/pkgconfig/libproxy-1.0.pc
lib/python${MODPY_VERSION}/site-packages/libproxy.py
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/Net/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/Net/Libproxy.pm
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/Net/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/Net/Libproxy/
libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/auto/Net/Libproxy/Libproxy.so
share/cmake/
share/cmake/Modules/
share/cmake/Modules/Findlibproxy.cmake
share/vala/
share/vala/vapi/
share/vala/vapi/libproxy-1.0.vapi

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PLIST-mozilla,v 1.1 2011/03/24 06:50:10 ajacoutot Exp $
lib/libproxy/0.4.6/modules/pacrunner_mozjs.so

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PLIST-webkit,v 1.1 2011/03/24 06:50:10 ajacoutot Exp $
lib/libproxy/0.4.6/modules/pacrunner_webkit.so