Externals - Adding netsurf config
authorJohn Hodge <[email protected]>
Mon, 1 Jul 2013 14:26:50 +0000 (22:26 +0800)
committerJohn Hodge <[email protected]>
Mon, 1 Jul 2013 14:26:50 +0000 (22:26 +0800)
Externals/common.mk
Externals/core.mk [new file with mode: 0644]
Externals/netsurf/Makefile [new file with mode: 0644]
Externals/netsurf/patches/UNIFIED.patch [new file with mode: 0644]

index 3264a19..575c51a 100644 (file)
@@ -3,94 +3,12 @@
 # - By John Hodge (thePowersGang)
 #
 # common.mk
-# - Common makefile code for imported code
+# - Common makefile code for many autoconf(-like) externals
 
--include ../../Makefile.cfg
-
-ifeq ($(ARCH),x86)
- BFD := i586
-else ifeq ($(ARCH),x86_64)
- BFD := x86_64
-else
- $(error No BFD translation for $(ARCH) in Externals/common.mk)
-endif
-
-#PREFIX=$(ACESSDIR)/Externals/Output
-#EPREFIX=$(ACESSDIR)/Externals/Output/$(BFD)
-PREFIX=$(ACESSDIR)/Externals/Output/$(ARCH)
-EPREFIX=$(PREFIX)
-SYSROOT=$(ACESSDIR)/Externals/Output/sysroot-$(BFD)
-HOST=$(BFD)-acess_proxy-elf
-
-#
-# DEPS : Dependencies for this program/library 
-# TARBALL_PATTERN : $(wildcard ) format [glob] pattern
-# TARBALL_TO_DIR : $(patsubst ) format conversion
-# PATCHES : List of altered files in the source
-#  > If patches/%.patch exists, the original is patched, else patches/% is copied in
-# CONFIGURE_ARGS : Extra arguments to ./configure (ignoring host and prefix)
-# [?]BTARGETS : Build targets (Defaults to all)
-# [?]ARCHIVE : Optional forced archive (Defaults to latest)
-# [?]CONFIGURE_LINE : Command to create makefile (defaults to autotools configure)
-# [?]NOBDIR : Set to non-empty to disable use of a separate build dir
-# [?]AUTORECONF : Set to non-empty to regenerate ./configure
-
-
-BTARGETS ?= all
-ITARGETS ?= install
-
-_VERS := $(wildcard $(TARBALL_PATTERN))
-_VERS := $(sort $(_VERS))
-_LATEST := $(lastword $(_VERS))
-
-ifeq ($(ARCHIVE),)
- ifeq ($(_LATEST),)
-  $(warning Unable to find an archive matching $(TARBALL_PATTERN))
-  $(error No archive found)
- endif
- ifneq ($(_LATEST),$(_VERS))
-  $(warning Multiple archvies found, picked $(_LATEST))
- endif
- ARCHIVE := $(_LATEST)
-endif
-
-DIR := $(patsubst $(TARBALL_TO_DIR_L),$(TARBALL_TO_DIR_R),$(ARCHIVE))
-
-ifeq ($(NOBDIR),)
- BDIR := build-$(DIR)
-else
- BDIR := $(DIR)
-endif
-SDIR := ../$(DIR)
+include $(dir $(lastword $(MAKEFILE_LIST)))/core.mk
 
 CONFIGURE_LINE ?= $(SDIR)/configure --host=$(HOST) --prefix=$(PREFIX) --exec-prefix=$(EPREFIX) $(CONFIGURE_ARGS)
 
-.PHONY: all clean install _patch _build
-
-install: all
-       cd $(BDIR) && make $(ITARGETS)
-
-all: $(DIR) _patch _build
-
-clean:
-       rm -rf $(DIR) $(BDIR)
-
-$(DIR): $(ARCHIVE)
-       tar -xf $(ARCHIVE)
-
-$(DIR)/%: patches/%.patch
-       @echo [PATCH] $@
-       @tar -xf $(ARCHIVE) $@
-       @patch $@ $<
-
-$(DIR)/%: patches/%
-       @echo [CP] $@
-       @mkdir -p $(dir $@)
-       @cp $< $@
-
-PATCHED_FILES := $(addprefix $(DIR)/,$(PATCHES))
-_patch: $(DIR) $(PATCHED_FILES)
 
 CONFIGSCRIPT := $(BDIR)/$(firstword $(CONFIGURE_LINE))
 PATCHED_ACFILES := $(filter %/configure.in %/config.sub, $(PATCHED_FILES))
@@ -104,8 +22,11 @@ endif
 
 $(BDIR)/Makefile: _patch $(CONFIGSCRIPT) ../common.mk Makefile 
        mkdir -p $(BDIR)
-       cd $(BDIR) && $(CONFIGURE_LINE)
+       cd $(BDIR) && PATH=$(PREFIX)-BUILD/bin:$(PATH) $(CONFIGURE_LINE)
 
 _build: $(BDIR)/Makefile
        cd $(BDIR) && make $(BTARGETS)
 
+install: all
+       cd $(BDIR) && make $(ITARGETS)
+
diff --git a/Externals/core.mk b/Externals/core.mk
new file mode 100644 (file)
index 0000000..3b788de
--- /dev/null
@@ -0,0 +1,95 @@
+# 
+# Acess2 OS - "Externals"
+# - By John Hodge (thePowersGang)
+#
+# core.mk
+# - Makefile code used by all externals
+
+-include ../../Makefile.cfg
+
+ifeq ($(ARCH),x86)
+ BFD := i586
+else ifeq ($(ARCH),x86_64)
+ BFD := x86_64
+else
+ $(error No BFD translation for $(ARCH) in Externals/common.mk)
+endif
+
+#PREFIX=$(ACESSDIR)/Externals/Output
+#EPREFIX=$(ACESSDIR)/Externals/Output/$(BFD)
+PREFIX=$(ACESSDIR)/Externals/Output/$(ARCH)
+EPREFIX=$(PREFIX)
+SYSROOT=$(ACESSDIR)/Externals/Output/sysroot-$(BFD)
+HOST=$(BFD)-acess_proxy-elf
+
+#
+# DEPS : Dependencies for this program/library 
+# TARBALL_PATTERN : $(wildcard ) format [glob] pattern
+# TARBALL_TO_DIR : $(patsubst ) format conversion
+# PATCHES : List of altered files in the source
+#  > If patches/%.patch exists, the original is patched, else patches/% is copied in
+# [?]BTARGETS : Build targets (Defaults to all)
+# [?]ARCHIVE : Optional forced archive (Defaults to latest)
+# [?]NOBDIR : Set to non-empty to disable use of a separate build dir
+
+# CONFIGURE_ARGS : Extra arguments to ./configure (ignoring host and prefix)
+# [?]CONFIGURE_LINE : Command to create makefile (defaults to autotools configure)
+# [?]AUTORECONF : Set to non-empty to regenerate ./configure
+
+
+BTARGETS ?= all
+ITARGETS ?= install
+
+_VERS := $(wildcard $(TARBALL_PATTERN))
+_VERS := $(sort $(_VERS))
+_LATEST := $(lastword $(_VERS))
+
+ifeq ($(ARCHIVE),)
+ ifeq ($(_LATEST),)
+  $(warning Unable to find an archive matching $(TARBALL_PATTERN))
+  $(error No archive found)
+ endif
+ ifneq ($(_LATEST),$(_VERS))
+  $(warning Multiple archvies found, picked $(_LATEST))
+ endif
+ ARCHIVE := $(_LATEST)
+endif
+
+DIR := $(patsubst $(TARBALL_TO_DIR_L),$(TARBALL_TO_DIR_R),$(ARCHIVE))
+
+ifeq ($(NOBDIR),)
+ BDIR := build-$(DIR)
+else
+ BDIR := $(DIR)
+endif
+SDIR := ../$(DIR)
+
+.PHONY: all clean install _patch _build
+
+all: $(DIR) _patch _build
+
+clean:
+       rm -rf $(DIR) $(BDIR)
+
+$(DIR): $(ARCHIVE) patches/UNIFIED.patch
+       tar -xf $(ARCHIVE)
+ifneq ($(wildcard patches/UNIFIED.patch),)
+       cd $(DIR) && patch -p1 < ../patches/UNIFIED.patch
+endif
+
+patches/UNIFIED.patch:
+       
+
+$(DIR)/%: patches/%.patch
+       @echo [PATCH] $@
+       @tar -xf $(ARCHIVE) $@
+       @patch $@ $<
+
+$(DIR)/%: patches/%
+       @echo [CP] $@
+       @mkdir -p $(dir $@)
+       @cp $< $@
+
+PATCHED_FILES := $(addprefix $(DIR)/,$(PATCHES))
+_patch: $(DIR) $(PATCHED_FILES)
diff --git a/Externals/netsurf/Makefile b/Externals/netsurf/Makefile
new file mode 100644 (file)
index 0000000..d4140c3
--- /dev/null
@@ -0,0 +1,18 @@
+#
+# Acess2 Externals - netsurf
+# - Patches and Makefile by John Hodge (thePowersGang)
+#
+
+DEPS := sdl12
+TARBALL_PATTERN := netsurf-*-full-src.tar.gz
+TARBALL_TO_DIR_L := netsurf-%-full-src.tar.gz
+TARBALL_TO_DIR_R := netsurf-full-%
+PATCHES := 
+NOBDIR = yes
+
+include ../core.mk
+
+_build:
+       cd $(BDIR) && CC=$(HOST)-gcc TARGET=sdl make
+
+
diff --git a/Externals/netsurf/patches/UNIFIED.patch b/Externals/netsurf/patches/UNIFIED.patch
new file mode 100644 (file)
index 0000000..e945631
--- /dev/null
@@ -0,0 +1,110 @@
+diff -ru .orig/netsurf-full-3.0//src/libcss-0.2.0/src/parse/language.c netsurf-full-3.0//src/libcss-0.2.0/src/parse/language.c
+--- .orig/netsurf-full-3.0//src/libcss-0.2.0/src/parse/language.c      2013-04-20 02:40:31.000000000 +0800
++++ netsurf-full-3.0//src/libcss-0.2.0/src/parse/language.c    2013-07-01 22:22:45.238691285 +0800
+@@ -357,7 +357,7 @@
+       context_entry entry = { CSS_PARSER_START_ATRULE, NULL };
+       const css_token *token = NULL;
+       const css_token *atkeyword = NULL;
+-      int32_t ctx = 0;
++      int ctx = 0;
+       bool match = false;
+       css_rule *rule;
+       css_error error;
+diff -ru .orig/netsurf-full-3.0//src/libcss-0.2.0/src/parse/parse.c netsurf-full-3.0//src/libcss-0.2.0/src/parse/parse.c
+--- .orig/netsurf-full-3.0//src/libcss-0.2.0/src/parse/parse.c 2013-04-20 02:40:31.000000000 +0800
++++ netsurf-full-3.0//src/libcss-0.2.0/src/parse/parse.c       2013-07-01 22:22:45.238691285 +0800
+@@ -2597,7 +2597,7 @@
+  */
+ void unref_interned_strings_in_tokens(css_parser *parser)
+ {
+-        int32_t ctx = 0;
++        int ctx = 0;
+         const css_token *tok;
+         
+         while ((tok = parserutils_vector_iterate(
+diff -ru .orig/netsurf-full-3.0//src/libcss-0.2.0/src/parse/properties/utils.c netsurf-full-3.0//src/libcss-0.2.0/src/parse/properties/utils.c
+--- .orig/netsurf-full-3.0//src/libcss-0.2.0/src/parse/properties/utils.c      2013-04-20 02:40:31.000000000 +0800
++++ netsurf-full-3.0//src/libcss-0.2.0/src/parse/properties/utils.c    2013-07-01 22:22:45.242699089 +0800
+@@ -993,7 +993,7 @@
+  * \return CSS_OK      on success,
+  *         CSS_INVALID on encountering an unknown keyword
+  */
+-css_error css__parse_unit_keyword(const char *ptr, size_t len, uint32_t *unit)
++css_error css__parse_unit_keyword(const char *ptr, size_t len, css_unit *unit)
+ {
+       if (len == 4) {
+               if (strncasecmp(ptr, "grad", 4) == 0)
+diff -ru .orig/netsurf-full-3.0//src/libcss-0.2.0/src/parse/properties/utils.h netsurf-full-3.0//src/libcss-0.2.0/src/parse/properties/utils.h
+--- .orig/netsurf-full-3.0//src/libcss-0.2.0/src/parse/properties/utils.h      2013-04-20 02:40:31.000000000 +0800
++++ netsurf-full-3.0//src/libcss-0.2.0/src/parse/properties/utils.h    2013-07-01 22:22:45.242699089 +0800
+@@ -179,7 +179,7 @@
+               css_fixed *length, uint32_t *unit);
+ css_error css__parse_unit_keyword(const char *ptr, size_t len, 
+-              uint32_t *unit);
++              css_unit *unit);
+ css_error css__ident_list_or_string_to_string(css_language *c,
+               const parserutils_vector *vector, int *ctx,
+diff -ru .orig/netsurf-full-3.0//src/libdom-0.0.1/Makefile netsurf-full-3.0//src/libdom-0.0.1/Makefile
+--- .orig/netsurf-full-3.0//src/libdom-0.0.1/Makefile  2013-04-19 00:18:13.000000000 +0800
++++ netsurf-full-3.0//src/libdom-0.0.1/Makefile        2013-07-01 22:22:45.242699089 +0800
+@@ -15,10 +15,6 @@
+ WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
+       -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
+       -Wmissing-declarations -Wnested-externs
+-# BeOS/Haiku standard library headers generate warnings
+-ifneq ($(TARGET),beos)
+-  WARNFLAGS := $(WARNFLAGS) -Werror
+-endif
+ # AmigaOS needs this to avoid warnings
+ ifeq ($(TARGET),amiga)
+   CFLAGS := -U__STRICT_ANSI__ $(CFLAGS)
+diff -ru .orig/netsurf-full-3.0//src/libdom-0.0.1/Makefile.config netsurf-full-3.0//src/libdom-0.0.1/Makefile.config
+--- .orig/netsurf-full-3.0//src/libdom-0.0.1/Makefile.config   2013-04-19 00:18:13.000000000 +0800
++++ netsurf-full-3.0//src/libdom-0.0.1/Makefile.config 2013-07-01 22:25:00.398701310 +0800
+@@ -3,7 +3,7 @@
+ # Build the libxml2 binding?
+ # yes | no
+ WITH_LIBXML_BINDING := no
+-WITH_EXPAT_BINDING := yes
++WITH_EXPAT_BINDING := no
+ # Build the hubbub binding?
+ # yes | no
+diff -ru .orig/netsurf-full-3.0//src/libparserutils-0.1.2/include/parserutils/utils/vector.h netsurf-full-3.0//src/libparserutils-0.1.2/include/parserutils/utils/vector.h
+--- .orig/netsurf-full-3.0//src/libparserutils-0.1.2/include/parserutils/utils/vector.h        2013-04-20 02:06:57.000000000 +0800
++++ netsurf-full-3.0//src/libparserutils-0.1.2/include/parserutils/utils/vector.h      2013-07-01 22:22:45.242699089 +0800
+@@ -33,9 +33,9 @@
+ parserutils_error parserutils_vector_get_length(parserutils_vector *vector, size_t *length);
+ const void *parserutils_vector_iterate(const parserutils_vector *vector, 
+-              int32_t *ctx);
++              int *ctx);
+ const void *parserutils_vector_peek(const parserutils_vector *vector,
+-              int32_t ctx);
++              int ctx);
+ #ifdef __cplusplus
+ }
+diff -ru .orig/netsurf-full-3.0//src/libparserutils-0.1.2/src/utils/vector.c netsurf-full-3.0//src/libparserutils-0.1.2/src/utils/vector.c
+--- .orig/netsurf-full-3.0//src/libparserutils-0.1.2/src/utils/vector.c        2013-04-20 02:06:57.000000000 +0800
++++ netsurf-full-3.0//src/libparserutils-0.1.2/src/utils/vector.c      2013-07-01 22:22:45.246689992 +0800
+@@ -195,7 +195,7 @@
+  * \note The value pointed to by \a ctx must be zero to begin the iteration.
+  */
+ const void *parserutils_vector_iterate(const parserutils_vector *vector, 
+-              int32_t *ctx)
++              int *ctx)
+ {
+       void *item;
+@@ -220,7 +220,7 @@
+  * \return Pointer to item, or NULL if no more
+  */
+ const void *parserutils_vector_peek(const parserutils_vector *vector, 
+-              int32_t ctx)
++              int ctx)
+ {
+       if (vector == NULL || vector->current_item < 0)
+               return NULL;

UCC git Repository :: git.ucc.asn.au