[packages/netsurf: 1/3] - new, based on Debian

witekfl witekfl at pld-linux.org
Wed Jan 9 21:07:51 CET 2013


commit 5c67da6c819fc4a6ae28aead026feb066e082711
Author: witekfl <witekfl at poczta.onet.pl>
Date:   Wed Jan 9 19:57:27 2013 +0100

    - new, based on Debian

 enable-nsfb.patch     |  11 +++++
 libnsfb-xcb-fix.patch | 103 +++++++++++++++++++++++++++++++++++++++
 netsurf.desktop       |  68 ++++++++++++++++++++++++++
 netsurf.spec          | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 314 insertions(+)
---
diff --git a/netsurf.spec b/netsurf.spec
new file mode 100644
index 0000000..95e8b01
--- /dev/null
+++ b/netsurf.spec
@@ -0,0 +1,132 @@
+Summary:	Light www browser
+Name:		netsurf
+Version:	2.9
+Release:	0.1
+License:	GPL v2
+Group:		Applications/Networking
+Source0:	http://download.netsurf-browser.org/netsurf/releases/source-full/%{name}-%{version}-full-src.tar.gz
+# Source0-md5:	cfc2789997b356f2ea9d9f7694c4c909
+Source1:	netsurf.desktop
+Patch0:		enable-nsfb.patch
+Patch1:		libnsfb-xcb-fix.patch
+URL:		http://netsurf-browser.org/
+BuildRequires:	SDL-devel
+BuildRequires:	curl-devel
+BuildRequires:	freetype-devel
+BuildRequires:	libglade2-devel
+BuildRequires:	libmng-devel
+BuildRequires:	libjpeg-devel
+BuildRequires:	libpng-devel
+BuildRequires:	librsvg-devel
+BuildRequires:	perl-base
+BuildRequires:	pkgconfig
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Small web browser with CSS support.
+NetSurf is a multi-platform lightweight web browser. Its aim is to provide
+comprehensive rendering of HTML 5 with CSS 2 in a small resource footprint
+while remaining fast.
+
+%package common
+Summary:	netsurf - common files
+Summary(pl.UTF-8):	netsurf - pliki wspólne
+License:	GPL v2
+Group:		Applications/Networking
+
+%description common
+netsurf - common files.
+
+%description common -l pl.UTF-8
+netsurf - wspólne pliki.
+
+%package gtk
+Summary:	netsurf browser SDL version
+Summary(pl.UTF-8):	Wersja SDL netsurfa
+License:	GPL v2
+Group:		Applications/Networking
+Requires:	%{name}-common = %{version}-%{release}
+
+%description gtk
+Small web browser with CSS support.
+NetSurf is a multi-platform lightweight web browser. Its aim is to provide
+comprehensive rendering of HTML 5 with CSS 2 in a small resource footprint
+while remaining fast.
+
+This is gtk version.
+
+%package sdl
+Summary:	netsurf browser SDL version
+Summary(pl.UTF-8):	Wersja SDL netsurfa
+License:	GPL v2
+Group:		Applications/Networking
+Requires:	%{name}-common = %{version}-%{release}
+
+%description sdl
+Small web browser with CSS support.
+NetSurf is a multi-platform lightweight web browser. Its aim is to provide
+comprehensive rendering of HTML 5 with CSS 2 in a small resource footprint
+while remaining fast.
+
+This is SDL version.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+cat << EOF > netsurf-2.9/Makefile.config
+NETSURF_FB_FONTLIB := freetype
+NETSURF_FB_FONTPATH := /usr/share/fonts/TTF
+EOF
+
+%build
+%{__make} \
+	\
+	PREFIX=%{_prefix} \
+	Q='' \
+	TARGET=gtk
+
+%{__make} \
+	\
+	PREFIX=%{_prefix} \
+	Q='' \
+	TARGET=framebuffer
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX=%{_prefix} \
+	TARGET=gtk \
+	Q=''
+
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX=%{_prefix} \
+	TARGET=framebuffer \
+	Q=''
+
+install %{SOURCE1} $RPM_BUILD_ROOT/%{_desktopdir}
+install netsurf-2.9/nsfb $RPM_BUILD_ROOT/%{_bindir}
+install netsurf-2.9/nsgtk $RPM_BUILD_ROOT/%{_bindir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files common
+%defattr(644,root,root,755)
+%doc netsurf-2.9/ChangeLog netsurf-2.9/README
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/*
+
+%files gtk
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/nsgtk
+%{_desktopdir}/netsurf.desktop
+
+%files sdl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/nsfb
diff --git a/enable-nsfb.patch b/enable-nsfb.patch
new file mode 100644
index 0000000..9c60eed
--- /dev/null
+++ b/enable-nsfb.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -58,7 +58,7 @@
+ 
+ #Library Target list
+ NSLIBTARG := $(LIBPARSERUTILS_TARG) $(LIBWAPCAPLET_TARG) $(LIBCSS_TARG) \
+-		$(LIBHUBBUB_TARG) $(LIBNSBMP_TARG) $(LIBNSGIF_TARG)
++		$(LIBHUBBUB_TARG) $(LIBNSBMP_TARG) $(LIBNSGIF_TARG) $(LIBNSFB_TARG)
+ 
+ ABLIBS := $(NSLIBTARG) $(LIBSVGTINY_TARG)
+ 
diff --git a/libnsfb-xcb-fix.patch b/libnsfb-xcb-fix.patch
new file mode 100644
index 0000000..7ae2337
--- /dev/null
+++ b/libnsfb-xcb-fix.patch
@@ -0,0 +1,103 @@
+--- a/libnsfb-0.0.2/Makefile
++++ b/libnsfb-0.0.2/Makefile
+@@ -32,16 +32,41 @@
+ endif 
+ 
+ ifeq ($(NSFB_XCB_AVAILABLE),yes)
+-  $(eval $(call pkg_config_package_min_version,NSFB_XCB_NEW_API,xcb,0.23))
++  # Size hint allocators were removed in xcb-icccm 0.3.0
++  $(eval $(call pkg_config_package_min_version,NSFB_XCB_ICCCM_SIZE_HINTS,xcb-icccm,0.3.0))
++  ifeq ($(NSFB_XCB_ICCCM_SIZE_HINTS),yes)
++    CFLAGS := $(CFLAGS) -DNSFB_NEED_HINTS_ALLOC
++  endif
++
++  # xcb-icccm 0.3.8 introduced an additional "icccm_" in function names
++  $(eval $(call pkg_config_package_min_version,NSFB_XCB_ICCCM_API_PREFIX,xcb-icccm,0.3.8))
++  ifeq ($(NSFB_XCB_ICCCM_API_PREFIX),yes)
++    CFLAGS := $(CFLAGS) -DNSFB_NEED_ICCCM_API_PREFIX
++  endif
+ 
+-  ifeq ($(NSFB_XCB_NEW_API),yes)
+-    CFLAGS := $(CFLAGS) -DNEED_HINTS_ALLOC
++  # xcbproto 1.6 incorporated atoms previously found in xcb_atom
++  # However, libxcb <1.3 did not report xcbproto versions. Assume xcbproto 1.5 in this case.
++  $(eval $(call pkg_config_package_min_version,NSFB_HAVE_MODERN_XCB,xcb,1.3))
++  ifeq ($(NSFB_HAVE_MODERN_XCB),yes)
++    $(eval $(call pkg_config_get_variable,NSFB_XCBPROTO_VERSION,xcb,xcbproto_version))
++    NSFB_XCBPROTO_MAJOR_VERSION := $(word 1,$(subst ., ,$(NSFB_XCBPROTO_VERSION)))
++    NSFB_XCBPROTO_MINOR_VERSION := $(word 2,$(subst ., ,$(NSFB_XCBPROTO_VERSION)))
++    CFLAGS := $(CFLAGS) -DNSFB_XCBPROTO_MAJOR_VERSION=$(NSFB_XCBPROTO_MAJOR_VERSION)
++    CFLAGS := $(CFLAGS) -DNSFB_XCBPROTO_MINOR_VERSION=$(NSFB_XCBPROTO_MINOR_VERSION)
++  else
++    CFLAGS := $(CFLAGS) -DNSFB_XCBPROTO_MAJOR_VERSION=1
++    CFLAGS := $(CFLAGS) -DNSFB_XCBPROTO_MINOR_VERSION=5
+   endif
+ 
+   $(eval $(call pkg_config_package_add_flags,$(NSFB_XCB_PKG_NAMES),CFLAGS))
+   $(eval $(call pkg_config_package_add_flags,$(NSFB_XCB_PKG_NAMES),TESTCFLAGS,TESTLDFLAGS))
+ 
+   REQUIRED_PKGS := $(REQUIRED_PKGS) $(NSFB_XCB_PKG_NAMES)
++
++  $(eval $(call pkg_config_package_available,NSFB_XCB_UTIL_AVAILABLE,xcb-util))
++  ifeq ($(NSFB_XCB_UTIL_AVAILABLE),yes)
++    REQUIRED_PKGS := $(REQUIRED_PKGS) xcb-util
++  endif
+ endif
+ 
+ ifeq ($(NSFB_VNC_AVAILABLE),yes)
+--- a/libnsfb-0.0.2/src/surface/x.c
++++ b/libnsfb-0.0.2/src/surface/x.c
+@@ -33,7 +33,7 @@
+ #include "plot.h"
+ #include "cursor.h"
+ 
+-#if defined(NEED_HINTS_ALLOC)
++#if defined(NSFB_NEED_HINTS_ALLOC)
+ static xcb_size_hints_t *
+ xcb_alloc_size_hints(void)
+ {
+@@ -47,6 +47,17 @@
+ }
+ #endif
+ 
++#if defined(NSFB_NEED_ICCCM_API_PREFIX)
++#define xcb_size_hints_set_max_size xcb_icccm_size_hints_set_max_size
++#define xcb_size_hints_set_min_size xcb_icccm_size_hints_set_min_size
++#define xcb_set_wm_size_hints       xcb_icccm_set_wm_size_hints
++#endif
++
++#if (NSFB_XCBPROTO_MAJOR_VERSION > 1) || \
++    (NSFB_XCBPROTO_MAJOR_VERSION == 1 && NSFB_XCBPROTO_MINOR_VERSION >= 6)
++#define WM_NORMAL_HINTS XCB_ATOM_WM_NORMAL_HINTS
++#endif
++
+ #define X_BUTTON_LEFT 1
+ #define X_BUTTON_MIDDLE 2
+ #define X_BUTTON_RIGHT 3
+--- a/libnsfb-0.0.2/build/makefiles/Makefile.pkgconfig
++++ b/libnsfb-0.0.2/build/makefiles/Makefile.pkgconfig
+@@ -24,7 +24,7 @@
+     $$(error pkg-config is required to auto-detect package version)
+   endif
+ 
+-  $(1) := $$(shell $$(PKGCONFIG) --version $(2))
++  $(1) := $$(shell $$(PKGCONFIG) --modversion $(2))
+ 
+ endef
+ 
+@@ -86,3 +86,15 @@
+ 
+ endef
+ 
++# Obtain the value of a pkg-config variable
++# 1: Name of variable to assign result into
++# 2: Name of package to search for
++# 3: Name of pkg-config variable to retrieve
++define pkg_config_get_variable
++  ifeq ($$(PKGCONFIG),)
++    $$(error pkg-config is required to auto-detect package version)
++  endif
++
++  $(1) := $$(shell $$(PKGCONFIG) --variable=$(3) $(2))
++
++endef
diff --git a/netsurf.desktop b/netsurf.desktop
new file mode 100644
index 0000000..31fca92
--- /dev/null
+++ b/netsurf.desktop
@@ -0,0 +1,68 @@
+[Desktop Entry]
+Name=NetSurf Web Browser
+Name[ca]=Navegador web NetSurf
+Name[cs]=NetSurf Webový prohlížeč
+Name[es]=Navegador web NetSurf
+Name[fa]=مرورگر اینترنتی NetSurf
+Name[fi]=NetSurf-selain
+Name[fr]=Navigateur Web NetSurf
+Name[hu]=NetSurf webböngésző
+Name[it]=NetSurf Browser Web
+Name[ja]=NetSurf ウェブ・ブラウザ
+Name[ko]=NetSurf 웹 브라우저
+Name[nb]=NetSurf Nettleser
+Name[nl]=NetSurf webbrowser
+Name[nn]=NetSurf Nettlesar
+Name[no]=NetSurf Nettleser
+Name[pl]=Przeglądarka WWW NetSurf
+Name[pt]=NetSurf Navegador Web
+Name[pt_BR]=Navegador Web NetSurf
+Name[sk]=Internetový prehliadač NetSurf
+Comment=Browse the World Wide Web
+Comment[ca]=Navegueu per el web
+Comment[cs]=Prohlížení stránek World Wide Webu
+Comment[de]=Im Internet surfen
+Comment[es]=Navegue por la web
+Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
+Comment[fi]=Selaa Internetin WWW-sivuja
+Comment[fr]=Navigue sur Internet
+Comment[hu]=A világháló böngészése
+Comment[it]=Esplora il web
+Comment[ja]=ウェブを閲覧します
+Comment[ko]=웹을 돌아 다닙니다
+Comment[nb]=Surf på nettet
+Comment[nl]=Verken het internet
+Comment[nn]=Surf på nettet
+Comment[no]=Surf på nettet
+Comment[pl]=Przeglądanie stron WWW 
+Comment[pt]=Navegue na Internet
+Comment[pt_BR]=Navegue na Internet
+Comment[sk]=Prehliadanie internetu
+GenericName=Web Browser
+GenericName[ca]=Navegador web
+GenericName[cs]=Webový prohlížeč
+GenericName[es]=Navegador web
+GenericName[fa]=مرورگر اینترنتی
+GenericName[fi]=WWW-selain
+GenericName[fr]=Navigateur Web
+GenericName[hu]=Webböngésző
+GenericName[it]=Browser Web
+GenericName[ja]=ウェブ・ブラウザ
+GenericName[ko]=웹 브라우저
+GenericName[nb]=Nettleser
+GenericName[nl]=Webbrowser
+GenericName[nn]=Nettlesar
+GenericName[no]=Nettleser
+GenericName[pl]=Przeglądarka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[sk]=Internetový prehliadač
+Exec=nsgtk %u
+Terminal=false
+X-MultipleArgs=false
+Type=Application
+Icon=netsurf.xpm
+Categories=Network;
+MimeType=text/html;text/xml;application/xhtml+xml;application/xml;image/gif;image/jpeg;image/png
+StartupWMClass=NetSurf-bin
+StartupNotify=true
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/netsurf.git/commitdiff/17e5188ec713d564d6047b5d3b4de766ca818f15



More information about the pld-cvs-commit mailing list