diff options
author | Michael Weber <xmw@gentoo.org> | 2013-02-27 09:44:36 +0000 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2013-02-27 09:44:36 +0000 |
commit | 6f80c933ae72574eee3c174db8d8b08a387da9f7 (patch) | |
tree | 0202fd3cb2eb7c53f8f5a8ebf83e918b1c6285c8 /dev-libs/libcss | |
parent | Fix unused variables. (diff) | |
download | gentoo-2-6f80c933ae72574eee3c174db8d8b08a387da9f7.tar.gz gentoo-2-6f80c933ae72574eee3c174db8d8b08a387da9f7.tar.bz2 gentoo-2-6f80c933ae72574eee3c174db8d8b08a387da9f7.zip |
netsurf eclass preparation. Fix enum comparison.
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)
Diffstat (limited to 'dev-libs/libcss')
-rw-r--r-- | dev-libs/libcss/ChangeLog | 8 | ||||
-rw-r--r-- | dev-libs/libcss/files/libcss-0.1.2-enum-compare.patch | 145 | ||||
-rw-r--r-- | dev-libs/libcss/libcss-0.1.2.ebuild | 63 |
3 files changed, 193 insertions, 23 deletions
diff --git a/dev-libs/libcss/ChangeLog b/dev-libs/libcss/ChangeLog index 44d813afaf97..3c74ca144ed7 100644 --- a/dev-libs/libcss/ChangeLog +++ b/dev-libs/libcss/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-libs/libcss -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libcss/ChangeLog,v 1.6 2012/11/11 21:23:41 xmw Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libcss/ChangeLog,v 1.7 2013/02/27 09:44:36 xmw Exp $ + + 27 Feb 2013; Michael Weber <xmw@gentoo.org> libcss-0.1.2.ebuild, + +files/libcss-0.1.2-enum-compare.patch: + netsurf eclass preparation. Fix enum comparison. 11 Nov 2012; Michael Weber <xmw@gentoo.org> libcss-0.1.2.ebuild: Cross compile fix (bug 431884, James Le Cuirot) diff --git a/dev-libs/libcss/files/libcss-0.1.2-enum-compare.patch b/dev-libs/libcss/files/libcss-0.1.2-enum-compare.patch new file mode 100644 index 000000000000..9a3ede78ce44 --- /dev/null +++ b/dev-libs/libcss/files/libcss-0.1.2-enum-compare.patch @@ -0,0 +1,145 @@ +--- libcss-0.1.2/src/select/properties/helpers.c ++++ libcss-0.1.2/src/select/properties/helpers.c +@@ -52,10 +52,12 @@ + uint16_t value = CSS_BACKGROUND_COLOR_INHERIT; + css_color color = 0; + +- assert(CSS_BACKGROUND_COLOR_INHERIT == CSS_BORDER_COLOR_INHERIT); +- assert(CSS_BACKGROUND_COLOR_COLOR == CSS_BORDER_COLOR_COLOR); ++ assert(CSS_BACKGROUND_COLOR_INHERIT == ++ (enum css_background_color_e)CSS_BORDER_COLOR_INHERIT); ++ assert(CSS_BACKGROUND_COLOR_COLOR == ++ (enum css_background_color_e)CSS_BORDER_COLOR_COLOR); + assert(CSS_BACKGROUND_COLOR_CURRENT_COLOR == +- CSS_BORDER_COLOR_CURRENT_COLOR); ++ (enum css_background_color_e)CSS_BORDER_COLOR_CURRENT_COLOR); + + if (isInherit(opv) == false) { + switch (getValue(opv)) { +--- libcss-0.1.2/src/parse/important.c ++++ libcss-0.1.2/src/parse/important.c +@@ -101,9 +101,9 @@ + case CSS_PROP_BACKGROUND_COLOR: + case CSS_PROP_COLUMN_RULE_COLOR: + assert(BACKGROUND_COLOR_SET == +- BORDER_COLOR_SET); ++ (enum op_background_color)BORDER_COLOR_SET); + assert(BACKGROUND_COLOR_SET == +- COLUMN_RULE_COLOR_SET); ++ (enum op_background_color)COLUMN_RULE_COLOR_SET); + + if (value == BACKGROUND_COLOR_SET) + offset++; /* colour */ +@@ -113,10 +113,12 @@ + case CSS_PROP_CUE_AFTER: + case CSS_PROP_CUE_BEFORE: + case CSS_PROP_LIST_STYLE_IMAGE: +- assert(BACKGROUND_IMAGE_URI == CUE_AFTER_URI); +- assert(BACKGROUND_IMAGE_URI == CUE_BEFORE_URI); ++ assert(BACKGROUND_IMAGE_URI == ++ (enum op_background_image)CUE_AFTER_URI); ++ assert(BACKGROUND_IMAGE_URI == ++ (enum op_background_image)CUE_BEFORE_URI); + assert(BACKGROUND_IMAGE_URI == +- LIST_STYLE_IMAGE_URI); ++ (enum op_background_image)LIST_STYLE_IMAGE_URI); + + if (value == BACKGROUND_IMAGE_URI) + offset++; /* string table entry */ +@@ -141,9 +143,10 @@ + case CSS_PROP_BORDER_LEFT_WIDTH: + case CSS_PROP_OUTLINE_WIDTH: + case CSS_PROP_COLUMN_RULE_WIDTH: +- assert(BORDER_WIDTH_SET == OUTLINE_WIDTH_SET); ++ assert(BORDER_WIDTH_SET == ++ (enum op_border_width)OUTLINE_WIDTH_SET); + assert(BORDER_WIDTH_SET == +- COLUMN_RULE_WIDTH_SET); ++ (enum op_border_width)COLUMN_RULE_WIDTH_SET); + + if (value == BORDER_WIDTH_SET) + offset += 2; /* length + units */ +@@ -161,14 +164,14 @@ + case CSS_PROP_WIDTH: + case CSS_PROP_COLUMN_WIDTH: + case CSS_PROP_COLUMN_GAP: +- assert(BOTTOM_SET == LEFT_SET); +- assert(BOTTOM_SET == RIGHT_SET); +- assert(BOTTOM_SET == TOP_SET); +- assert(BOTTOM_SET == HEIGHT_SET); +- assert(BOTTOM_SET == MARGIN_SET); +- assert(BOTTOM_SET == WIDTH_SET); +- assert(BOTTOM_SET == COLUMN_WIDTH_SET); +- assert(BOTTOM_SET == COLUMN_GAP_SET); ++ assert(BOTTOM_SET == (enum op_bottom)LEFT_SET); ++ assert(BOTTOM_SET == (enum op_bottom)RIGHT_SET); ++ assert(BOTTOM_SET == (enum op_bottom)TOP_SET); ++ assert(BOTTOM_SET == (enum op_bottom)HEIGHT_SET); ++ assert(BOTTOM_SET == (enum op_bottom)MARGIN_SET); ++ assert(BOTTOM_SET == (enum op_bottom)WIDTH_SET); ++ assert(BOTTOM_SET == (enum op_bottom)COLUMN_WIDTH_SET); ++ assert(BOTTOM_SET == (enum op_bottom)COLUMN_GAP_SET); + + if (value == BOTTOM_SET) + offset += 2; /* length + units */ +@@ -231,7 +234,7 @@ + case CSS_PROP_COUNTER_INCREMENT: + case CSS_PROP_COUNTER_RESET: + assert(COUNTER_INCREMENT_NONE == +- COUNTER_RESET_NONE); ++ (enum op_counter_increment)COUNTER_RESET_NONE); + + while (value != COUNTER_INCREMENT_NONE) { + offset+=2; /* string + integer */ +@@ -276,7 +279,8 @@ + + case CSS_PROP_LETTER_SPACING: + case CSS_PROP_WORD_SPACING: +- assert(LETTER_SPACING_SET == WORD_SPACING_SET); ++ assert(LETTER_SPACING_SET == ++ (enum op_letter_spacing)WORD_SPACING_SET); + + if (value == LETTER_SPACING_SET) + offset += 2; /* length + units */ +@@ -296,7 +300,8 @@ + + case CSS_PROP_MAX_HEIGHT: + case CSS_PROP_MAX_WIDTH: +- assert(MAX_HEIGHT_SET == MAX_WIDTH_SET); ++ assert(MAX_HEIGHT_SET == ++ (enum op_max_height)MAX_WIDTH_SET); + + if (value == MAX_HEIGHT_SET) + offset += 2; /* length + units */ +@@ -311,11 +316,11 @@ + case CSS_PROP_PAUSE_AFTER: + case CSS_PROP_PAUSE_BEFORE: + case CSS_PROP_TEXT_INDENT: +- assert(MIN_HEIGHT_SET == MIN_WIDTH_SET); +- assert(MIN_HEIGHT_SET == PADDING_SET); +- assert(MIN_HEIGHT_SET == PAUSE_AFTER_SET); +- assert(MIN_HEIGHT_SET == PAUSE_BEFORE_SET); +- assert(MIN_HEIGHT_SET == TEXT_INDENT_SET); ++ assert(MIN_HEIGHT_SET == (enum op_min_height)MIN_WIDTH_SET); ++ assert(MIN_HEIGHT_SET == (enum op_min_height)PADDING_SET); ++ assert(MIN_HEIGHT_SET == (enum op_min_height)PAUSE_AFTER_SET); ++ assert(MIN_HEIGHT_SET == (enum op_min_height)PAUSE_BEFORE_SET); ++ assert(MIN_HEIGHT_SET == (enum op_min_height)TEXT_INDENT_SET); + + if (value == MIN_HEIGHT_SET) + offset += 2; /* length + units */ +@@ -331,10 +336,10 @@ + case CSS_PROP_RICHNESS: + case CSS_PROP_STRESS: + case CSS_PROP_WIDOWS: +- assert(ORPHANS_SET == PITCH_RANGE_SET); +- assert(ORPHANS_SET == RICHNESS_SET); +- assert(ORPHANS_SET == STRESS_SET); +- assert(ORPHANS_SET == WIDOWS_SET); ++ assert(ORPHANS_SET == (enum op_orphans)PITCH_RANGE_SET); ++ assert(ORPHANS_SET == (enum op_orphans)RICHNESS_SET); ++ assert(ORPHANS_SET == (enum op_orphans)STRESS_SET); ++ assert(ORPHANS_SET == (enum op_orphans)WIDOWS_SET); + + if (value == ORPHANS_SET) + offset++; /* value */ diff --git a/dev-libs/libcss/libcss-0.1.2.ebuild b/dev-libs/libcss/libcss-0.1.2.ebuild index 5506076794c3..942c7d41c596 100644 --- a/dev-libs/libcss/libcss-0.1.2.ebuild +++ b/dev-libs/libcss/libcss-0.1.2.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libcss/libcss-0.1.2.ebuild,v 1.6 2012/11/11 21:23:41 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libcss/libcss-0.1.2.ebuild,v 1.7 2013/02/27 09:44:36 xmw Exp $ -EAPI=4 +EAPI=5 -inherit multilib toolchain-funcs +inherit eutils multilib toolchain-funcs DESCRIPTION="CSS parser and selection engine, written in C" HOMEPAGE="http://www.netsurf-browser.org/projects/libcss/" @@ -13,39 +13,60 @@ SRC_URI="http://download.netsurf-browser.org/libs/releases/libcss-0.1.2-src.tar. LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm" -IUSE="static-libs test" +IUSE="debug static-libs test" RDEPEND="dev-libs/libparserutils dev-libs/libwapcaplet" DEPEND="${RDEPEND} test? ( dev-lang/perl )" +pkg_setup(){ + netsurf_src_prepare() { + sed -e "/^CCOPT :=/s:=.*:=:" \ + -e "/^CCNOOPT :=/s:=.*:=:" \ + -e "/^CCDBG :=/s:=.*:=:" \ + -i build/makefiles/Makefile.{gcc,clang} || die + sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \ + -i Makefile || die + sed -e "/^libdir/s:/lib:/$(get_libdir):g" \ + -i ${PN}.pc.in || die + } + netsurf_src_configure() { + echo "Q := " >> Makefile.config + echo "CC := $(tc-getCC)" >> Makefile.config + echo "AR := $(tc-getAR)" >> Makefile.config + } + + netsurf_make() { + emake COMPONENT_TYPE=lib-shared BUILD=$(usex debug debug release) "$@" + use static-libs && \ + emake COMPONENT_TYPE=lib-static BUILD=$(usex debug debug release) "$@" + } +} + src_prepare() { - sed -e "/^INSTALL_ITEMS/s: /lib: /$(get_libdir):g" \ - -e "s:-Werror::g" \ - -i Makefile || die - sed -e "/^libdir/s:/lib:/$(get_libdir):g" \ - -i ${PN}.pc.in || die - sed -e "s/\$\$(HOST_CC)/$(tc-getBUILD_CC)/g" \ + netsurf_src_prepare + + sed -e 's/x86_64-pc-linux-gnu-gcc/$(CC)/' \ -i src/parse/properties/Makefile || die - echo "Q := " >> Makefile.config.override - echo "CC := $(tc-getCC)" >> Makefile.config.override - echo "AR := $(tc-getAR)" >> Makefile.config.override + + epatch "${FILESDIR}"/${P}-enum-compare.patch +} + +src_configure() { + netsurf_src_configure } src_compile() { - emake COMPONENT_TYPE=lib-shared - use static-libs && emake COMPONENT_TYPE=lib-static + netsurf_make } src_test() { - emake COMPONENT_TYPE=lib-shared test - use static-libs && emake COMPONENT_TYPE=lib-static test + netsurf_make test } src_install() { - emake DESTDIR="${D}" PREFIX=/usr COMPONENT_TYPE=lib-shared install - use static-libs && \ - emake DESTDIR="${D}" PREFIX=/usr COMPONENT_TYPE=lib-static install + netsurf_make DESTDIR="${D}" PREFIX=/usr install + dodoc README } |