Fix netsurf and dependencies on x86_64.

* lint problems, missing PATCHES, missing checksums
* a few actual issues in netsurf itself
* now builds and runs fine.
This commit is contained in:
Adrien Destugues
2015-07-13 19:57:17 +02:00
parent 3cd4064ed6
commit aa45bcc74d
10 changed files with 83 additions and 5685 deletions

View File

@@ -4,10 +4,12 @@ other applications."
HOMEPAGE="http://git.netsurf-browser.org/libnsutils.git/"
COPYRIGHT="2014 Vincent Sanders"
LICENSE="MIT"
ARCHITECTURES="x86_gcc2"
ARCHITECTURES="x86_gcc2 x86_64"
REVISION="1"
SOURCE_URI="http://download.netsurf-browser.org/libs/releases/libnsutils-$portVersion-src.tar.gz"
CHECKSUM_SHA256="9ad6b921bceed2c0d44ca6ff36fa76841cc6533f8ed7ccb0a941fd9a78731afd"
PATCHES="libnsutils-$portVersion.patchset"
PROVIDES="
libnsutils = $portVersion

View File

@@ -2,7 +2,7 @@ SUMMARY="A library for building efficient parsers"
DESCRIPTION="LibParserUtils is a library for building efficient parsers."
HOMEPAGE="http://www.netsurf-browser.org/projects/libparserutils/"
SOURCE_URI="http://download.netsurf-browser.org/libs/releases/libparserutils-$portVersion-src.tar.gz"
#CHECKSUM_SHA256="55c50abbffaaebe17acba43008ee2c4085401ce618e505fafa7c75baaa813da7"
CHECKSUM_SHA256="30589e6b3adf0c14b5a78de1fba3b9b84cbd74e95e22d45827fa3e09b563f735"
REVISION="1"
LICENSE="MIT"
COPYRIGHT="2007-2014 J-M Bell"

View File

@@ -1,4 +1,4 @@
SUMMARY="library for processing UTF-8 encoded Unicode strings."
SUMMARY="library for processing UTF-8 encoded Unicode strings"
DESCRIPTION="utf8proc is a small, clean C library that provides Unicode \
normalization, case-folding, and other operations for data in the UTF-8 \
encoding, supporting Unicode version 7.0."

View File

@@ -12,7 +12,7 @@ COPYRIGHT="
"
LICENSE="
GNU GPL v1
Artistic (Perl)
Artistic
"
SOURCE_URI="https://github.com/gisle/html-parser/archive/$portVersion.tar.gz"
SOURCE_FILENAME="html_parser-$portVersion.tar.gz"

View File

@@ -1,77 +0,0 @@
SUMMARY="NetSurf is a multi-platform web browser"
DESCRIPTION="
Small as a mouse, fast as a cheetah and available for free. NetSurf is a \
multi-platform web browser for RISC OS, UNIX-like platforms (including Linux), \
Mac OS X, and more.
Whether you want to check your webmail, read the news or post to discussion \
forums, NetSurf is your lightweight gateway to the world wide web. Actively \
developed, NetSurf is continually evolving and improving.
"
HOMEPAGE="http://www.netsurf-browser.org/"
COPYRIGHT="2003-2014 The NetSurf Browser project"
LICENSE="GNU GPL v2"
SOURCE_URI="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-$portVersion-src.tar.gz"
CHECKSUM_SHA256="1ef12b2e2bc68f9eff8465646b7359e3cb483e1042aed750cc283a70dd4c540c"
REVISION="2"
ARCHITECTURES="x86_gcc2 x86 x86_64"
PATCHES="netsurf-$portVersion.patchset"
PROVIDES="
netsurf = $portVersion
app:NetSurf = $portVersion
"
REQUIRES="
haiku
lib:libcurl
lib:libexpat
lib:libiconv
lib:libpng
lib:libjpeg
lib:libssl
lib:libz
"
BUILD_REQUIRES="
haiku_devel
devel:libcurl
devel:libexpat
devel:libiconv
devel:libjpeg
devel:libpng
devel:libssl
devel:libz
devel:libcss
devel:libdom
devel:libhubbub
devel:libnsbmp
devel:libnsgif
devel:libparserutils
devel:libsvgtiny
devel:libwapcaplet
"
BUILD_PREREQUIRES="
html_parser >= 3.70
cmd:bison
cmd:flex
cmd:gcc
cmd:git
cmd:gperf
cmd:make
cmd:pkg_config
"
BUILD()
{
make PREFIX=$prefix/ DESTDIR=$appsDir/ \
NETSURF_BEOS_BIN=netsurf/ NETSURF_BEOS_RESOURCES=netsurf/res/
}
INSTALL()
{
make PREFIX=$prefix/ DESTDIR=$appsDir/ \
NETSURF_BEOS_BIN=netsurf/ NETSURF_BEOS_RESOURCES=netsurf/res/ install
addAppDeskbarSymlink $appsDir/netsurf/NetSurf NetSurf
}

View File

@@ -1,82 +0,0 @@
SUMMARY="NetSurf is a multi-platform web browser"
DESCRIPTION="
Small as a mouse, fast as a cheetah and available for free. NetSurf is a \
multi-platform web browser for RISC OS, UNIX-like platforms (including Linux), \
Mac OS X, and more.
Whether you want to check your webmail, read the news or post to discussion \
forums, NetSurf is your lightweight gateway to the world wide web. Actively \
developed, NetSurf is continually evolving and improving.
"
HOMEPAGE="http://www.netsurf-browser.org/"
# Do NOT use the netsurf-all package. It contains a bunch of subprojects which
# we build as separate packages. NetSurf is statically linked to them, so the
# resulting binary is the same.
SOURCE_URI="git://git.netsurf-browser.org/netsurf.git#9b62f1ec53b089e6697131a3653c78ff85a5e4d1"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
REQUIRES="
haiku
lib:libcurl
lib:libexpat
lib:libiconv
lib:libpng
lib:libjpeg
lib:libssl
lib:libz
lib:libhubbub
"
BUILD_REQUIRES="
haiku_devel
devel:libcurl
devel:libexpat
devel:libiconv
devel:libjpeg
devel:libpng
devel:libssl
devel:libz
devel:libcss
devel:libdom
devel:libhubbub
devel:libnsbmp
devel:libnsgif
devel:libparserutils
devel:libsvgtiny
devel:libwapcaplet
"
BUILD_PREREQUIRES="
html_parser >= 3.70
cmd:bison
cmd:flex
cmd:gcc
cmd:git
cmd:gperf
cmd:make
cmd:pkg_config
"
PROVIDES="
netsurf = $portVersion
app:NetSurf = $portVersion
"
PATCHES="netsurf-$portVersion.patchset"
BUILD()
{
make TARGET=beos PREFIX=$prefix/ DESTDIR=$appsDir/ BUILD=release \
NETSURF_BEOS_BIN=netsurf/ NETSURF_BEOS_RESOURCES=netsurf/res/
}
INSTALL()
{
make TARGET=beos PREFIX=$prefix/ DESTDIR=$appsDir/ \
NETSURF_BEOS_BIN=netsurf/ NETSURF_BEOS_RESOURCES=netsurf/res/ install
addAppDeskbarSymlink $appsDir/netsurf/NetSurf NetSurf
}
LICENSE="GNU GPL v2"
COPYRIGHT="2003-2014 The NetSurf Browser project"

View File

@@ -10,10 +10,11 @@ developed, NetSurf is continually evolving and improving.
"
HOMEPAGE="http://www.netsurf-browser.org/"
# Do NOT use the netsurf-all package. It contains a bunch of subprojects which
# we build as separate packages. NetSurf is statically linked to them, so the
# resulting binary is the same.
# we build as separate packages so they can easily be used by other projects.
SOURCE_URI="http://download.netsurf-browser.org/netsurf/releases/source/netsurf-$portVersion-src.tar.gz"
CHECKSUM_SHA256="23f92a0940f577b9605f2e54786fea3521680d32d6c00f2a3db1eae3f29e3686"
PATCHES="netsurf-$portVersion.patchset"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"
REQUIRES="

View File

@@ -1,308 +0,0 @@
From 5eba735be6cfdd28056a7e10028a6e43d520b62d Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 9 Jun 2014 21:44:48 +0200
Subject: Fix include path for 3.1 release.
diff --git a/beos/about.cpp b/beos/about.cpp
index cd8070e..2483a22 100644
--- a/beos/about.cpp
+++ b/beos/about.cpp
@@ -23,7 +23,7 @@
extern "C" {
#include "desktop/netsurf.h"
#include "utils/log.h"
-#include "utils/testament.h"
+#include "testament.h"
#include "utils/useragent.h"
#include "curl/curlver.h"
}
--
1.8.3.4
From 0ca5cc927067cbbc43fc14c2753bea6a80d7e629 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 20 Jun 2014 13:23:22 +0200
Subject: Use PathFinder to locate resource folder.
So it can work wherever NetSurf is installed...
diff --git a/beos/gui.cpp b/beos/gui.cpp
index 365a356..caa6ef4 100644
--- a/beos/gui.cpp
+++ b/beos/gui.cpp
@@ -37,6 +37,7 @@
#include <FindDirectory.h>
#include <Mime.h>
#include <Path.h>
+#include <PathFinder.h>
#include <Roster.h>
#include <Screen.h>
#include <String.h>
@@ -79,9 +80,6 @@ extern "C" {
static void *myrealloc(void *ptr, size_t len, void *pw);
-/* Where to search for shared resources. Must have trailing / */
-#define RESPATH "/boot/apps/netsurf/res/"
-
//TODO: use resources
// enable using resources instead of files
#define USE_RESOURCES 1
@@ -297,7 +295,13 @@ static char *find_resource(char *buf, const char *filename, const char *def)
return buf;
}
- strcpy(t, RESPATH);
+
+ BPathFinder f((void*)find_resource);
+
+ BPath p;
+ f.FindPath(B_FIND_PATH_APPS_DIRECTORY, "netsurf/res/", p);
+ strcpy(t, p.Path());
+
strcat(t, filename);
realpath(t, buf);
if (access(buf, R_OK) == 0)
@@ -488,7 +492,10 @@ static bool nslog_stream_configure(FILE *fptr)
static BPath get_messages_path()
{
- BPath p("/boot/apps/netsurf/res");
+ BPathFinder f((void*)get_messages_path);
+
+ BPath p;
+ f.FindPath(B_FIND_PATH_APPS_DIRECTORY, "netsurf/res", p);
// TODO: use Haiku's BLocale stuff
BString lang(getenv("LC_MESSAGES"));
lang.Truncate(2);
--
1.8.3.4
From 10221eb8e3326f1fc7db289a88d3962097ded3fd Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Aug 2014 17:08:21 +0000
Subject: let's find libcss
diff --git a/Makefile b/Makefile
index 4f9380a..58a3fd6 100644
--- a/Makefile
+++ b/Makefile
@@ -200,7 +200,7 @@ else
CC := gcc
CXX := g++
EXEEXT :=
- PKG_CONFIG :=
+ PKG_CONFIG := pkg-config
#endif
else
ifeq ($(TARGET),windows)
diff --git a/beos/Makefile.target b/beos/Makefile.target
index ed7532d..26ac998 100644
--- a/beos/Makefile.target
+++ b/beos/Makefile.target
@@ -79,6 +79,11 @@ else
$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
endif
+$(eval $(call pkg_config_find_and_add,libcss,CSS))
+$(eval $(call pkg_config_find_and_add,libdom,DOM))
+$(eval $(call pkg_config_find_and_add,libhubbub,Hubbub))
+$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
+$(eval $(call pkg_config_find_and_add,libcurl,Curl ))
# ----------------------------------------------------------------------------
# Source file setup
--
1.8.3.4
From 62d67afbfcd0a586107b1ce104ba7d40cd79a1c0 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Aug 2014 17:42:55 +0000
Subject: declaration of 'BRect frame' shadows a parameter
diff --git a/beos/scaffolding.cpp b/beos/scaffolding.cpp
index 35153b3..0df5365 100644
--- a/beos/scaffolding.cpp
+++ b/beos/scaffolding.cpp
@@ -186,12 +186,12 @@ private:
const BBitmap *fIconBitmap;
};
-NSIconTextControl::NSIconTextControl(BRect frame, const char* name,
+NSIconTextControl::NSIconTextControl(BRect _frame, const char* name,
const char* label, const char* initialText,
BMessage* message,
uint32 resizeMode,
uint32 flags)
- : BTextControl(frame, name, label, initialText, message, resizeMode, flags),
+ : BTextControl(_frame, name, label, initialText, message, resizeMode, flags),
fIconOffset(0,0),
fIconBitmap(NULL)
{
--
1.8.3.4
From 563da3f7cd533d395ac3b6a45d7828ffbd5b45bf Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Aug 2014 17:47:22 +0000
Subject: fix Haiku case
diff --git a/Makefile b/Makefile
index 58a3fd6..36b8380 100644
--- a/Makefile
+++ b/Makefile
@@ -61,10 +61,6 @@ else
ifeq ($(HOST),BeOS)
HOST := beos
endif
- ifeq ($(HOST),Haiku)
- # Haiku implements the BeOS API
- HOST := beos
- endif
ifeq ($(HOST),beos)
# Build happening on BeOS platform, default target is BeOS backend
ifeq ($(TARGET),)
@@ -100,11 +96,18 @@ else
TARGET := windows
endif
endif
-
+ ifeq ($(HOST),Haiku)
+ # Build happening on Haiku platform, default target is BeOS backend
+ ifeq ($(TARGET),)
+ TARGET := beos
+ endif
+ endif
+
# Default target is GTK backend
ifeq ($(TARGET),)
TARGET := gtk
endif
+
endif
endif
endif
@@ -194,14 +197,11 @@ ifeq ($(TARGET),riscos)
else
ifeq ($(TARGET),beos)
# Building for BeOS/Haiku
- #ifeq ($(HOST),beos)
- # Build for BeOS on BeOS
- GCCSDK_INSTALL_ENV := /boot/develop
- CC := gcc
- CXX := g++
- EXEEXT :=
- PKG_CONFIG := pkg-config
- #endif
+ GCCSDK_INSTALL_ENV := /boot/develop
+ CC := gcc
+ CXX := g++
+ EXEEXT :=
+ PKG_CONFIG := pkg-config
else
ifeq ($(TARGET),windows)
ifneq ($(HOST),windows)
diff --git a/beos/Makefile.target b/beos/Makefile.target
index 26ac998..2beaa46 100644
--- a/beos/Makefile.target
+++ b/beos/Makefile.target
@@ -38,12 +38,8 @@ ifeq ($(HOST),beos)
ifneq ($(wildcard /boot/develop/lib/*/libzeta.so),)
LDFLAGS += -lzeta
endif
- ifneq ($(wildcard /boot/develop/lib/*/libnetwork.so),)
+ ifeq ($(HOST),Haiku)
# Haiku
- CFLAGS += -I/boot/common/include \
- -I/boot/common/include/hubbub \
- -I/boot/common/include/libcss \
- -I/boot/common/include/parserutils
NETLDFLAGS := -lnetwork
else
ifneq ($(wildcard /boot/develop/lib/*/libbind.so),)
@@ -72,18 +68,19 @@ ifeq ($(HOST),beos)
$(eval $(call feature_enabled,GIF,-DWITH_GIF,-lnsgif,GIF (libnsgif)))
$(eval $(call feature_enabled,PNG,-DWITH_PNG,-lpng,PNG (libpng) ))
else
+ NETLDFLAGS := -lnetwork
NETSURF_FEATURE_BMP_CFLAGS := -DWITH_BMP
NETSURF_FEATURE_GIF_CFLAGS := -DWITH_GIF
NETSURF_FEATURE_PNG_CFLAGS := -DWITH_PNG
+endif
$(eval $(call pkg_config_find_and_add_enabled,BMP,libnsbmp,BMP))
$(eval $(call pkg_config_find_and_add_enabled,GIF,libnsgif,GIF))
$(eval $(call pkg_config_find_and_add_enabled,PNG,libpng,PNG ))
-endif
-$(eval $(call pkg_config_find_and_add,libcss,CSS))
-$(eval $(call pkg_config_find_and_add,libdom,DOM))
-$(eval $(call pkg_config_find_and_add,libhubbub,Hubbub))
-$(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
-$(eval $(call pkg_config_find_and_add,libcurl,Curl ))
+ $(eval $(call pkg_config_find_and_add,libcss,CSS))
+ $(eval $(call pkg_config_find_and_add,libdom,DOM))
+ $(eval $(call pkg_config_find_and_add,libhubbub,Hubbub))
+ $(eval $(call pkg_config_find_and_add,openssl,OpenSSL))
+ $(eval $(call pkg_config_find_and_add,libcurl,Curl ))
# ----------------------------------------------------------------------------
# Source file setup
--
1.8.3.4
From 542734b11d256a596eb1735cdac273f90a70d865 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Aug 2014 19:29:14 +0000
Subject: x86_64 fixes
diff --git a/beos/filetype.cpp b/beos/filetype.cpp
index d5bd3d7..a3bcddb 100644
--- a/beos/filetype.cpp
+++ b/beos/filetype.cpp
@@ -72,7 +72,7 @@ void beos_fetch_filetype_init(void)
continue;
}
// the mime db doesn't know about it yet
- BMessage extensions(0UL);
+ BMessage extensions((uint32)0UL);
if (default_types[i].ext1)
extensions.AddString("extensions", default_types[i].ext1);
if (default_types[i].ext2)
diff --git a/beos/window.cpp b/beos/window.cpp
index 8975c18..af736b8 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -1288,7 +1288,7 @@ void gui_get_clipboard(char **buffer, size_t *length)
clip = be_clipboard->Data();
if (clip) {
const char *text;
- int32 textlen;
+ ssize_t textlen;
if (clip->FindData("text/plain", B_MIME_TYPE,
(const void **)&text, &textlen) >= B_OK) {
*buffer = (char *)malloc(textlen);
diff --git a/utils/talloc.c b/utils/talloc.c
index 44b65aa..408e94b 100644
--- a/utils/talloc.c
+++ b/utils/talloc.c
@@ -55,7 +55,7 @@
#include "replace.h"
#else
#include <stdarg.h>
-#if !defined(__BEOS__) && !defined(__HAIKU__) && __GNUC__ > 2
+#if !defined(__BEOS__) && __GNUC__ > 2
/* Assume we've got va_copy */
#define HAVE_VA_COPY
#include <string.h>
--
1.8.3.4

File diff suppressed because it is too large Load Diff

View File

@@ -5212,3 +5212,77 @@ index b5ca966..83d05f4 100644
--
2.2.2
From 8caff1e7fd12569dd9c090f5b78c159b913d9096 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Mon, 13 Jul 2015 19:45:02 +0200
Subject: Fix build on 64-bit Haiku
- Fix path to look for libnetwork to work also on non-hybrid systems
- Remove references to /boot/common as it is not used anymore
- Fix a few type errors
- Use compiler provided va_copy when available
diff --git a/beos/Makefile.target b/beos/Makefile.target
index 478593c..5edb896 100644
--- a/beos/Makefile.target
+++ b/beos/Makefile.target
@@ -42,16 +42,8 @@ ifeq ($(HOST),beos)
ifneq ($(wildcard /boot/develop/lib/*/libzeta.so),)
LDFLAGS += -lzeta
endif
- ifneq ($(wildcard /boot/system/develop/lib/*/libnetwork.so),)
+ ifneq ($(wildcard /boot/system/develop/lib/libnetwork.so),)
# Haiku
- CFLAGS += -I/boot/common/include \
- -I/boot/common/include/hubbub \
- -I/boot/common/include/libcss \
- -I/boot/common/include/parserutils
- CXXFLAGS += -I/boot/common/include \
- -I/boot/common/include/hubbub \
- -I/boot/common/include/libcss \
- -I/boot/common/include/parserutils
NETLDFLAGS := -lnetwork
else
ifneq ($(wildcard /boot/develop/lib/*/libbind.so),)
diff --git a/beos/filetype.cpp b/beos/filetype.cpp
index d5bd3d7..5a54154 100644
--- a/beos/filetype.cpp
+++ b/beos/filetype.cpp
@@ -72,7 +72,7 @@ void beos_fetch_filetype_init(void)
continue;
}
// the mime db doesn't know about it yet
- BMessage extensions(0UL);
+ BMessage extensions('exts');
if (default_types[i].ext1)
extensions.AddString("extensions", default_types[i].ext1);
if (default_types[i].ext2)
diff --git a/beos/window.cpp b/beos/window.cpp
index a507d6f..0229a73 100644
--- a/beos/window.cpp
+++ b/beos/window.cpp
@@ -1275,7 +1275,7 @@ void gui_get_clipboard(char **buffer, size_t *length)
clip = be_clipboard->Data();
if (clip) {
const char *text;
- int32 textlen;
+ ssize_t textlen;
if (clip->FindData("text/plain", B_MIME_TYPE,
(const void **)&text, &textlen) >= B_OK) {
*buffer = (char *)malloc(textlen);
diff --git a/utils/talloc.c b/utils/talloc.c
index 44b65aa..408e94b 100644
--- a/utils/talloc.c
+++ b/utils/talloc.c
@@ -55,7 +55,7 @@
#include "replace.h"
#else
#include <stdarg.h>
-#if !defined(__BEOS__) && !defined(__HAIKU__) && __GNUC__ > 2
+#if !defined(__BEOS__) && __GNUC__ > 2
/* Assume we've got va_copy */
#define HAVE_VA_COPY
#include <string.h>
--
1.8.3.4