From: Stefan Huber Date: Sat, 28 Nov 2026 23:11:08 +0000 (+0100) Subject: media-gfx/ipe: add 7.3.1 X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=shuber-gentoo-overlay.git media-gfx/ipe: add 7.3.1 Upstream dropped the "v" tag prefix, so rename the distfile to ${P}.tar.gz. Pass IPEUI=QT, which is no longer defaulted, and pass the Lua flags from lua-single instead of relying on config.mak's lua5.5 pkg-config name. make install now ships the desktop file and hicolor icons, so drop make_desktop_entry and inherit xdg instead. Rebase the highprec patch onto the reformatted ipebase.cpp. Sync ipe-9999. Co-Authored-By: Claude Opus 5.5 --- diff --git a/media-gfx/ipe/Manifest b/media-gfx/ipe/Manifest index 5e5e8c6..b2be8e4 100644 --- a/media-gfx/ipe/Manifest +++ b/media-gfx/ipe/Manifest @@ -1,9 +1,12 @@ +AUX ipe-7.3.1-outputprecision.patch 2318 BLAKE2B 90c7e4276467b8610f5ffca108fb3695cd08e97798a246c016d6fff13894fa6c6b8357974792a83d018dfa6a714072a3e62f927882b53c1710de09667efb245e SHA512 ee514b561a77c0c775ebe3918e43a94d06c429869e96c3d39fcd275af34bee8089b3dbbee5c3506cb9a873a196f6b5b3d1ccc98c0afa47ed5aae12063a008d2a AUX ipe-outputprecision.patch 2488 BLAKE2B f6ac5918a2c23445885ecf3f6934484aaebdc90809ccf08b1b11c301ca0821726b9907fcd6a76d3501d874bda36c379c37fa611c75e97951ff460380e45c532b SHA512 0e851a4e2dae2d8deb11018da0c375ab219126072f152b29ba314a2c04b89b169eaac9981413a8144ac6119cf5f261d346c413af69e0a229e5946ad5c8b7b407 +DIST ipe-7.3.1.tar.gz 1384925 BLAKE2B 1ff611e3fce2be134576407bd72e44b472ba89c9fc282df0b79837fb0c5e25ba5dadd062607755b7a8b3505e894c3cc7229dcb218dde85b48ac6efb05eda821e SHA512 d39da1ad40b3c5a4a7fd13eb9c1713a7dcb64db3703ecebef8ff481ce91bb0e9f832d9616fd5d512c395393a3e9da31daf234887cd9cdbf94e86cc79afc596bc DIST v7.2.28.tar.gz 929625 BLAKE2B 40c1bd4c8de1a590ccc4aee01e7d549838a86498c9e2dcfa62a8742baf6eee824ed58bec318f57d47c98e7c882d6181f64f1cb7e9d853c9d7cf705709d2b28ef SHA512 4eccea0baa9a5d206c4c6590620e936a6765a86a45bd0abcec2b3a66b3b74481e7c84efea4321cc8b3ae587be351ca66551e752e02f0b4d488df1ebbb5d8a107 DIST v7.2.29.tar.gz 931955 BLAKE2B dff6db5d031731a00c7582999f0d41f7515933fcd96e27bd339b18a8e0068e2e9de4bc365a2e16284bd5f7f184fefddbf05fc2c6e76a814e371085f532d5972b SHA512 ab8f3f683005405531bf1eb8e193e88ea3df08b4761188258b8c4e4ccac536b4958fd256c23bff6c935ef612f077b98fc45b72e0cc63d881328270c29503fedd DIST v7.2.30.tar.gz 932256 BLAKE2B 0afd8895112f66c5f673c85287abebc9b0436773bdf81a8a860daca71b023330624c37368168081c987cdc2c2001cf58c80f5f06d50dc6d7bf8b8c9f9376ff62 SHA512 0997582969f2629c9d1e7fc11d7a637bcd10fd086219c3fb205f424cac020b79a2f374744598bb12601e507e96c747ab63ef18698c2e495026f2f2bff17d9315 EBUILD ipe-7.2.28.ebuild 2583 BLAKE2B 7692d07e1ab14ec55d356c7f78f79feab27e20e0089de9659806c256d0aec1fdbc5ae3d46e908124e3329381e2c2c6479c5fc1d32662c9be1df3d63f42535a06 SHA512 5a1bbbd681290329a09afca7f49f8d7a1605c761c72ff66267fddd776d4dc320097fe6696d0370dd35eef8ac4d6fd43e9acdbe15e2095417e37d080ab65cf6ec EBUILD ipe-7.2.29.ebuild 2583 BLAKE2B 7692d07e1ab14ec55d356c7f78f79feab27e20e0089de9659806c256d0aec1fdbc5ae3d46e908124e3329381e2c2c6479c5fc1d32662c9be1df3d63f42535a06 SHA512 5a1bbbd681290329a09afca7f49f8d7a1605c761c72ff66267fddd776d4dc320097fe6696d0370dd35eef8ac4d6fd43e9acdbe15e2095417e37d080ab65cf6ec EBUILD ipe-7.2.30.ebuild 2583 BLAKE2B 7692d07e1ab14ec55d356c7f78f79feab27e20e0089de9659806c256d0aec1fdbc5ae3d46e908124e3329381e2c2c6479c5fc1d32662c9be1df3d63f42535a06 SHA512 5a1bbbd681290329a09afca7f49f8d7a1605c761c72ff66267fddd776d4dc320097fe6696d0370dd35eef8ac4d6fd43e9acdbe15e2095417e37d080ab65cf6ec -EBUILD ipe-9999.ebuild 2595 BLAKE2B a455c6edb3865d7f19af863529e3e6f553abe12994dd5333eca3805d77a0e2fa84b47e62c70107ade9e4d56868096e2f3e9ccd0709ac86188fb624c01835e7ce SHA512 98ccdd4d4b3b4cba5bfd0088ea725d698d35712e5ffda4fc440042b0ce3df1d20294510a8c821a9dd9c7262156ead26755b0512cca46d399e060eb557e2bd45e +EBUILD ipe-7.3.1.ebuild 2718 BLAKE2B 6224361b05eb2a11b5495514f8483e8d93fb21f2ce509a2d2c0bd9c2e7a47dc0981f4b8d9b93976d9247f79d55686bbf88e165e2c40b02fea2abe6f3192688eb SHA512 e96983319f8a36df1137e732d1e225a75e09b20cff6c62c73f66615247f2baa8a3b7f2461d0355cb7c8b08e768e5a6ec3df4288b828264e6368961056c43e8df +EBUILD ipe-9999.ebuild 2617 BLAKE2B 9ae2938e1012cf81f60e0279df228489381376462dadae285bc7458c355add6542a7feae03cb7cee8527a7cae9e561e5448ff0638c161827f69d76f078594747 SHA512 c9e187d2bc8d8f016efeddf14de33377b4debee5de9d4a3d85e55bb7da075aabb2dec9d0c8a6ac95bf8b2ca52adf5a804a9d7a6e0e31775e892eb7be10c6b595 MISC metadata.xml 413 BLAKE2B c4004dbf7fb41ecb7a117896aaedf9da37d95a7e1d726b9cb9d1cb88fcae444f9e0ac35b01d8e3c32d9bfcdb32b2c5b08bf34f94467e870edf4711151f47f4b0 SHA512 b2ba78cafbcc539f4f403396158dbe770e8b884ca2cc6377bc4d749889aa2f394eb4fe19a6a52fce646c3b17774baf09abe8240908c871ee9adc5a647f24a20e diff --git a/media-gfx/ipe/files/ipe-7.3.1-outputprecision.patch b/media-gfx/ipe/files/ipe-7.3.1-outputprecision.patch new file mode 100644 index 0000000..e965722 --- /dev/null +++ b/media-gfx/ipe/files/ipe-7.3.1-outputprecision.patch @@ -0,0 +1,92 @@ +--- a/ipelib/ipebase.cpp ++++ b/ipelib/ipebase.cpp +@@ -629,55 +629,43 @@ + + //! Output double. + Stream & Stream::operator<<(double d) { +- char buf[30]; +- if (d < 0.0) { +- putChar('-'); +- d = -d; ++ // Maximum number of digits in total ++ const unsigned maxdigits = 14; ++ ++ const unsigned bufsize = 511; ++ char buf[bufsize + 1]; ++ ++ // The number of digits left of '.' ++ int intpartsize = 0; ++ if (fabs(d) >= 1.0) { ++ snprintf(buf, bufsize, "%.0f", fabs(d)); ++ intpartsize = strlen(buf); + } +- if (d >= 1e9) { +- // PDF will not be able to read this, but we have to write something. +- // Such large numbers should only happen if something is wrong. +- std::snprintf(buf, sizeof(buf), "%g", d); +- putCString(buf); +- } else if (d < 1e-8) { +- putChar('0'); +- } else { +- // Print six significant digits, but omit trailing zeros. +- // Probably I'll want to have adjustable precision later. +- int factor; +- if (d > 1000.0) +- factor = 100L; +- else if (d > 100.0) +- factor = 1000L; +- else if (d > 10.0) +- factor = 10000L; +- else if (d > 1.0) +- factor = 100000L; +- else if (d > 0.1) +- factor = 1000000L; +- else if (d > 0.01) +- factor = 10000000L; +- else +- factor = 100000000L; +- double dd = trunc(d); +- int intpart = int(dd + 0.5); +- // 10^9 < 2^31 +- int v = int(factor * (d - dd) + 0.5); +- if (v >= factor) { +- ++intpart; +- v -= factor; +- } +- std::snprintf(buf, sizeof(buf), "%d", intpart); +- putCString(buf); +- int mask = factor / 10; +- if (v != 0) { +- putChar('.'); +- while (v != 0) { +- putChar('0' + v / mask); +- v = (10 * v) % factor; +- } ++ ++ // The number of digits right of '.' ++ int respartsize = maxdigits - intpartsize; ++ if (respartsize < 0) respartsize = 0; ++ ++ // Building the format string and get the string conversion of d ++ char fmt[256]; ++ snprintf(fmt, 255, "%%%d.%df", intpartsize, respartsize); ++ snprintf(buf, bufsize, fmt, d); ++ ++ // Truncate redundant zeros and '.' from the right ++ for (int i = strlen(buf) - 1; i >= intpartsize; i--) { ++ // Truncate all zeros from right-hand ++ if (buf[i] == '0') { ++ buf[i] = '\0'; ++ continue; + } ++ ++ // Remove decimal dot without decimal digits ++ if (buf[i] == '.') buf[i] = '\0'; ++ ++ break; + } ++ ++ putCString(buf); + return *this; + } + diff --git a/media-gfx/ipe/ipe-7.3.1.ebuild b/media-gfx/ipe/ipe-7.3.1.ebuild new file mode 100644 index 0000000..d4bf2ff --- /dev/null +++ b/media-gfx/ipe/ipe-7.3.1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{3,4} ) +inherit lua-single toolchain-funcs xdg + +DESCRIPTION="Drawing editor for creating figures in PDF or PS formats" +HOMEPAGE="https://ipe.otfried.org" + +if [[ ${PV} == *9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/otfried/${PN}.git" +else + SRC_URI="https://github.com/otfried/ipe/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +S="${WORKDIR}/${P}/src" +COMMONDIR=/usr/share/ipe/common + +LICENSE="GPL-3" +SLOT="0" +IUSE="highprec" +RESTRICT="mirror" + +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND=" + ${LUA_DEPS} + app-text/texlive-core + dev-qt/qtbase:6[widgets,gui] + dev-qt/qtsvg:6 + media-libs/freetype:2 + media-libs/libjpeg-turbo + media-libs/libpng + media-libs/libspiro + sci-libs/gsl + virtual/zlib + x11-libs/cairo + " +DEPEND="${RDEPEND}" + +BDEPEND=" + dev-util/desktop-file-utils + virtual/pkgconfig + " + +search_urw_fonts() { + # colon-separated list of paths + local texmfdist="$(kpsewhich -var-value=TEXMFDIST)" + # according to TeX directory structure + local urwdir=fonts/type1/urw + # add colon as field separator + local IFS="${IFS}:" dir + for dir in ${texmfdist}; do + if [[ -d ${dir}/${urwdir} ]]; then + URWFONTDIR="${dir}/${urwdir}" + return 0 + fi + done + return 1 +} + +pkg_setup() { + lua-single_pkg_setup + if search_urw_fonts; then + einfo "URW fonts found in ${URWFONTDIR}" + else + ewarn "Could not find directory containing URW fonts" + ewarn "Ipe will not function properly without them." + fi +} + +src_prepare() { + sed -i \ + -e 's/fpic/fPIC/' \ + -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \ + config.mak || die + + if use highprec; then + eapply "${FILESDIR}"/${PN}-7.3.1-outputprecision.patch + fi + + eapply_user +} + +ipe_emake() { + emake \ + IPEUI=QT \ + CXX="$(tc-getCXX)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + MOC="${EPREFIX}/usr/$(get_libdir)/qt6/libexec/moc" \ + LUA_CFLAGS="$(lua_get_CFLAGS)" \ + LUA_LIBS="$(lua_get_LIBS)" \ + IPEPREFIX="${EPREFIX}/usr" \ + IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \ + "$@" +} + +src_compile() { + ipe_emake +} + +src_install() { + ipe_emake install INSTALL_ROOT="${D}" + + # Link style sheets + if [[ -d ${COMMONDIR}/styles ]]; then + einfo "Linking common style sheets from ${COMMONDIR}" + local f + for f in "${COMMONDIR}"/styles/*; do + einfo " Linking ${f##*/}" + dosym "${f}" /usr/share/ipe/${PV}/styles/${f##*/} + done + + elog "Style sheets from ${COMMONDIR}/styles have been symlinked to" + elog "the style sheet directory of ${P}. If you add additional" + elog "style sheets later to ${COMMONDIR}/styles you may symlink" + elog "them by hand to '/usr/share/ipe/${PV}/styles/'." + fi +} diff --git a/media-gfx/ipe/ipe-9999.ebuild b/media-gfx/ipe/ipe-9999.ebuild index 2539a39..32af058 100644 --- a/media-gfx/ipe/ipe-9999.ebuild +++ b/media-gfx/ipe/ipe-9999.ebuild @@ -1,20 +1,20 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -LUA_COMPAT=( lua5-4 ) -inherit desktop lua-single toolchain-funcs +LUA_COMPAT=( lua5-{3,4} ) +inherit lua-single toolchain-funcs xdg DESCRIPTION="Drawing editor for creating figures in PDF or PS formats" -HOMEPAGE="http://ipe.otfried.org" +HOMEPAGE="https://ipe.otfried.org" if [[ ${PV} == *9999* ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/otfried/${PN}.git" else - KEYWORDS="~amd64" - SRC_URI=" https://github.com/otfried/ipe/archive/refs/tags/v${PV}.tar.gz" + SRC_URI="https://github.com/otfried/ipe/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" fi S="${WORKDIR}/${P}/src" @@ -27,6 +27,7 @@ RESTRICT="mirror" REQUIRED_USE="${LUA_REQUIRED_USE}" RDEPEND=" + ${LUA_DEPS} app-text/texlive-core dev-qt/qtbase:6[widgets,gui] dev-qt/qtsvg:6 @@ -38,10 +39,12 @@ RDEPEND=" virtual/zlib x11-libs/cairo " -DEPEND="${RDEPEND} - ${LUA_DEPS}" +DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" +BDEPEND=" + dev-util/desktop-file-utils + virtual/pkgconfig + " search_urw_fonts() { # colon-separated list of paths @@ -59,17 +62,6 @@ search_urw_fonts() { return 1 } -src_prepare() { - sed -i \ - -e 's/fpic/fPIC/' \ - -e 's_/usr/lib/qt6/libexec/moc_/usr/lib64/qt6/libexec/moc_' \ - -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \ - config.mak || die - sed -i -e 's/install -s/install/' common.mak || die - - eapply_user -} - pkg_setup() { lua-single_pkg_setup if search_urw_fonts; then @@ -80,31 +72,47 @@ pkg_setup() { fi } -src_compile() { +src_prepare() { + sed -i \ + -e 's/fpic/fPIC/' \ + -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \ + config.mak || die + + eapply_user +} + +ipe_emake() { emake \ - CXX=$(tc-getCXX) \ + IPEUI=QT \ + CXX="$(tc-getCXX)" \ + PKG_CONFIG="$(tc-getPKG_CONFIG)" \ + MOC="${EPREFIX}/usr/$(get_libdir)/qt6/libexec/moc" \ + LUA_CFLAGS="$(lua_get_CFLAGS)" \ + LUA_LIBS="$(lua_get_LIBS)" \ IPEPREFIX="${EPREFIX}/usr" \ - IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" + IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \ + "$@" +} + +src_compile() { + ipe_emake } src_install() { - emake install \ - IPEPREFIX="${EPREFIX}/usr" \ - IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \ - INSTALL_ROOT="${ED}" \ - LUA_VERSION="$(lua_get_version)" - make_desktop_entry ipe Ipe ipe + ipe_emake install INSTALL_ROOT="${D}" + # Link style sheets - if [ -d $COMMONDIR/styles ]; then - einfo "Linking common style sheets from $COMMONDIR" - for f in $COMMONDIR/styles/*; do + if [[ -d ${COMMONDIR}/styles ]]; then + einfo "Linking common style sheets from ${COMMONDIR}" + local f + for f in "${COMMONDIR}"/styles/*; do einfo " Linking ${f##*/}" - dosym $f usr/share/ipe/${PV}/styles/${f##*/} + dosym "${f}" /usr/share/ipe/${PV}/styles/${f##*/} done - elog "Style sheets from $COMMONDIR/styles have been symlinked to" + elog "Style sheets from ${COMMONDIR}/styles have been symlinked to" elog "the style sheet directory of ${P}. If you add additional" - elog "style sheets later to $COMMONDIR/styles you may symlink" + elog "style sheets later to ${COMMONDIR}/styles you may symlink" elog "them by hand to '/usr/share/ipe/${PV}/styles/'." fi }