2018-12-05 14:40:40 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# netsurf
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2020-06-06 15:58:49 +02:00
|
|
|
NETSURF_VERSION = 3.10
|
2018-12-05 14:40:40 +01:00
|
|
|
NETSURF_SOURCE = netsurf-all-$(NETSURF_VERSION).tar.gz
|
|
|
|
NETSURF_SITE = http://download.netsurf-browser.org/netsurf/releases/source-full
|
|
|
|
NETSURF_LICENSE = GPL-2.0
|
|
|
|
NETSURF_LICENSE_FILES = netsurf/COPYING
|
2019-07-28 11:23:54 +02:00
|
|
|
# host-vim needed for the xxd utility
|
2018-12-12 08:14:55 +01:00
|
|
|
NETSURF_DEPENDENCIES = expat jpeg libpng \
|
2019-07-28 11:23:54 +02:00
|
|
|
host-bison host-flex host-gperf host-pkgconf host-vim
|
2018-12-05 14:40:40 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSURF_GTK),y)
|
|
|
|
NETSURF_DEPENDENCIES += libgtk2
|
2020-06-06 15:58:49 +02:00
|
|
|
NETSURF_FRONTEND = gtk2
|
2018-12-12 08:14:54 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSURF_GTK3),y)
|
|
|
|
NETSURF_DEPENDENCIES += libgtk3
|
|
|
|
NETSURF_FRONTEND = gtk3
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSURF_GTK)$(BR2_PACKAGE_NETSURF_GTK3),y)
|
2018-12-05 14:40:40 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBRSVG),y)
|
|
|
|
NETSURF_DEPENDENCIES += librsvg
|
|
|
|
define NETSURF_SVG_CONFIGURE_CMDS
|
|
|
|
echo "override NETSURF_USE_RSVG := YES" >> $(@D)/netsurf/Makefile.config
|
|
|
|
echo "override NETSURF_USE_NSSVG := NO" >> $(@D)/netsurf/Makefile.config
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_NETSURF_SDL),y)
|
2018-12-11 16:02:09 +01:00
|
|
|
NETSURF_DEPENDENCIES += sdl host-libpng
|
2018-12-05 14:40:40 +01:00
|
|
|
NETSURF_FRONTEND = framebuffer
|
2018-12-13 19:54:33 +01:00
|
|
|
NETSURF_CONFIG = \
|
2019-07-22 07:17:15 +02:00
|
|
|
BUILD_CFLAGS='$(HOST_CFLAGS)' \
|
|
|
|
BUILD_LDFLAGS='$(HOST_LDFLAGS) -lpng'
|
2018-12-12 08:14:52 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FREETYPE),y)
|
|
|
|
NETSURF_DEPENDENCIES += freetype
|
|
|
|
define NETSURF_FONTLIB_CONFIGURE_CMDS
|
|
|
|
echo "override NETSURF_FB_FONTLIB := freetype" >> $(@D)/netsurf/Makefile.config
|
|
|
|
endef
|
|
|
|
endif
|
2018-12-05 14:40:40 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
|
|
NETSURF_DEPENDENCIES += libiconv
|
|
|
|
define NETSURF_ICONV_CONFIGURE_CMDS
|
|
|
|
echo "CFLAGS += -DWITH_ICONV_FILTER" >> $(@D)/libparserutils/Makefile.config.override
|
|
|
|
echo "override NETSURF_USE_LIBICONV_PLUG := NO" >> $(@D)/netsurf/Makefile.config
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2018-12-12 08:14:55 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
|
|
|
NETSURF_DEPENDENCIES += libcurl openssl
|
|
|
|
else
|
|
|
|
define NETSURF_CURL_CONFIGURE_CMDS
|
|
|
|
echo "override NETSURF_USE_CURL := NO" >> $(@D)/netsurf/Makefile.config
|
|
|
|
echo "override NETSURF_USE_OPENSSL := NO" >> $(@D)/netsurf/Makefile.config
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2019-07-21 16:11:08 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_WEBP),y)
|
|
|
|
NETSURF_DEPENDENCIES += webp
|
|
|
|
define NETSURF_WEBP_CONFIGURE_CMDS
|
|
|
|
echo "override NETSURF_USE_WEBP := YES" >> $(@D)/netsurf/Makefile.config
|
|
|
|
endef
|
|
|
|
else
|
|
|
|
define NETSURF_WEBP_CONFIGURE_CMDS
|
|
|
|
echo "override NETSURF_USE_WEBP := NO" >> $(@D)/netsurf/Makefile.config
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2018-12-05 14:40:40 +01:00
|
|
|
define NETSURF_CONFIGURE_CMDS
|
|
|
|
$(NETSURF_ICONV_CONFIGURE_CMDS)
|
|
|
|
$(NETSURF_SVG_CONFIGURE_CMDS)
|
2018-12-12 08:14:52 +01:00
|
|
|
$(NETSURF_FONTLIB_CONFIGURE_CMDS)
|
2018-12-12 08:14:55 +01:00
|
|
|
$(NETSURF_CURL_CONFIGURE_CMDS)
|
2019-07-21 16:11:08 +02:00
|
|
|
$(NETSURF_WEBP_CONFIGURE_CMDS)
|
2018-12-05 14:40:40 +01:00
|
|
|
endef
|
|
|
|
|
package/netsurf: change how CFLAGS/LDFLAGS are passed
Fixes:
http://autobuild.buildroot.net/results/eeb2863c6237aac8428e49a5ee514d43088b0fb8
http://autobuild.buildroot.net/results/f938fd1515f1d6e11b57aa6e314135789da52a44
In commit 6da049f8ae61b956d135526722ce58fc2f67626a ("package/netsurf:
fix build"), the CC variable passed to netsurf's build system was
extended to pass some special -I and -L options needed for netsurf to
find its own headers/libraries.
Unfortunately, on some systems (including mine), it breaks the build,
due to:
toolpath_ := $(shell /bin/which $(CC__))
when $(CC__) contains some -I/-L options, they are considered to be
options "to which", which causes the funny:
/usr/bin/make install --directory=libnslog HOST=arm-buildroot-linux-uclibcgnueabi PREFIX=/home/thomas/projets/outputs/shared-netsurf/build/netsurf-3.8/tmpusr Q=@ WARNFLAGS='-Wall -W -Wno-error' DESTDIR=
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
/bin/which: invalid option -- 'I'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 'e'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 't'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 's'
/bin/which: invalid option -- '/'
[...]
/bin/which: invalid option -- 'l'
/bin/which: invalid option -- 'b'
/bin/which: --read-alias, -i: Warning: stdin is a tty.
and the build simply hangs.
We cannot pass CFLAGS/LDFLAGS as make options, as they would override
the CFLAGS definitions in netsurf Makefiles. However, those Makefiles
use the construct:
CFLAGS := $(CFLAGS) -more-flags
so by passing CFLAGS and LDFLAGS through the make environment, which
can achieve our goal.
It is worth mentioning that it remains very fragile, because
CFLAGS/LDFLAGS are used both for building target objects but also some
host tools. The netsurf build system is really not good.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-09 22:28:07 +02:00
|
|
|
NETSURF_MAKE_ENV = \
|
|
|
|
$(TARGET_MAKE_ENV) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) -I$(@D)/tmpusr/include" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS) -L$(@D)/tmpusr/lib"
|
|
|
|
|
2018-12-05 14:40:40 +01:00
|
|
|
NETSURF_MAKE_OPTS = \
|
|
|
|
TARGET=$(NETSURF_FRONTEND) \
|
|
|
|
BISON="$(HOST_DIR)/bin/bison" \
|
|
|
|
FLEX="$(HOST_DIR)/bin/flex" \
|
|
|
|
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
|
|
|
|
BUILD_CC="$(HOSTCC)" \
|
package/netsurf: change how CFLAGS/LDFLAGS are passed
Fixes:
http://autobuild.buildroot.net/results/eeb2863c6237aac8428e49a5ee514d43088b0fb8
http://autobuild.buildroot.net/results/f938fd1515f1d6e11b57aa6e314135789da52a44
In commit 6da049f8ae61b956d135526722ce58fc2f67626a ("package/netsurf:
fix build"), the CC variable passed to netsurf's build system was
extended to pass some special -I and -L options needed for netsurf to
find its own headers/libraries.
Unfortunately, on some systems (including mine), it breaks the build,
due to:
toolpath_ := $(shell /bin/which $(CC__))
when $(CC__) contains some -I/-L options, they are considered to be
options "to which", which causes the funny:
/usr/bin/make install --directory=libnslog HOST=arm-buildroot-linux-uclibcgnueabi PREFIX=/home/thomas/projets/outputs/shared-netsurf/build/netsurf-3.8/tmpusr Q=@ WARNFLAGS='-Wall -W -Wno-error' DESTDIR=
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
/bin/which: invalid option -- 'I'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 'e'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 't'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 's'
/bin/which: invalid option -- '/'
[...]
/bin/which: invalid option -- 'l'
/bin/which: invalid option -- 'b'
/bin/which: --read-alias, -i: Warning: stdin is a tty.
and the build simply hangs.
We cannot pass CFLAGS/LDFLAGS as make options, as they would override
the CFLAGS definitions in netsurf Makefiles. However, those Makefiles
use the construct:
CFLAGS := $(CFLAGS) -more-flags
so by passing CFLAGS and LDFLAGS through the make environment, which
can achieve our goal.
It is worth mentioning that it remains very fragile, because
CFLAGS/LDFLAGS are used both for building target objects but also some
host tools. The netsurf build system is really not good.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-09 22:28:07 +02:00
|
|
|
CC="$(TARGET_CC)" \
|
2018-12-05 14:40:40 +01:00
|
|
|
AR="$(TARGET_AR)" \
|
2018-12-17 09:47:10 +01:00
|
|
|
TMP_PREFIX=$(@D)/tmpusr \
|
2018-12-13 19:54:33 +01:00
|
|
|
NETSURF_CONFIG="$(NETSURF_CONFIG)" \
|
2018-12-05 14:40:40 +01:00
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
define NETSURF_BUILD_CMDS
|
2018-12-17 09:47:10 +01:00
|
|
|
mkdir -p $(@D)/tmpusr
|
package/netsurf: change how CFLAGS/LDFLAGS are passed
Fixes:
http://autobuild.buildroot.net/results/eeb2863c6237aac8428e49a5ee514d43088b0fb8
http://autobuild.buildroot.net/results/f938fd1515f1d6e11b57aa6e314135789da52a44
In commit 6da049f8ae61b956d135526722ce58fc2f67626a ("package/netsurf:
fix build"), the CC variable passed to netsurf's build system was
extended to pass some special -I and -L options needed for netsurf to
find its own headers/libraries.
Unfortunately, on some systems (including mine), it breaks the build,
due to:
toolpath_ := $(shell /bin/which $(CC__))
when $(CC__) contains some -I/-L options, they are considered to be
options "to which", which causes the funny:
/usr/bin/make install --directory=libnslog HOST=arm-buildroot-linux-uclibcgnueabi PREFIX=/home/thomas/projets/outputs/shared-netsurf/build/netsurf-3.8/tmpusr Q=@ WARNFLAGS='-Wall -W -Wno-error' DESTDIR=
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
/bin/which: invalid option -- 'I'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 'e'
/bin/which: invalid option -- '/'
/bin/which: invalid option -- 't'
/bin/which: invalid option -- 'h'
/bin/which: invalid option -- 'o'
/bin/which: invalid option -- 'm'
/bin/which: invalid option -- 's'
/bin/which: invalid option -- '/'
[...]
/bin/which: invalid option -- 'l'
/bin/which: invalid option -- 'b'
/bin/which: --read-alias, -i: Warning: stdin is a tty.
and the build simply hangs.
We cannot pass CFLAGS/LDFLAGS as make options, as they would override
the CFLAGS definitions in netsurf Makefiles. However, those Makefiles
use the construct:
CFLAGS := $(CFLAGS) -more-flags
so by passing CFLAGS and LDFLAGS through the make environment, which
can achieve our goal.
It is worth mentioning that it remains very fragile, because
CFLAGS/LDFLAGS are used both for building target objects but also some
host tools. The netsurf build system is really not good.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-09 22:28:07 +02:00
|
|
|
$(NETSURF_MAKE_ENV) $(MAKE) -C $(@D) $(NETSURF_MAKE_OPTS) \
|
2018-12-05 14:40:40 +01:00
|
|
|
build
|
|
|
|
endef
|
|
|
|
|
|
|
|
define NETSURF_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(NETSURF_MAKE_OPTS) \
|
|
|
|
DESTDIR=$(TARGET_DIR) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|