x11-libs/fox: add 1.7.85, add deps

deps:
* add pkg from x11-libs/ to prevent auto-rdep
  could be an useflag per pkg but forced here, as xcursor and xrandr
* fontconfig is required by xft option (truetype useflag)
* rm libpng as support is now built-in

patches instead of sed

Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/40761
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Nicolas PARLANT
2025-02-26 00:47:29 +00:00
committed by Sam James
parent 5d7a01d1bd
commit 6013a4b9a3
5 changed files with 196 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
DIST fox-1.6.57.tar.gz 4284018 BLAKE2B 3efbc6188225f9444fbd347359e8b4041a08fe654acb99c48e4966e501a2f72a44863f2e9b60ae810a259951f89cfc27b9a8b6341e029627066712e0dbf20e40 SHA512 e7b91054a9ea674818803415284cb61572935d22466e446cb37ef68344e2684e8acd567f7c8a6912f939dcbcc37455119ad6a01ac30513f460d0b3937b7e6087
DIST fox-1.7.67.tar.gz 5689421 BLAKE2B 60f2d8e887a41f1e234cd31c1bd2702bcedae0f1b47cb7b9832c317e34a9b517cb603033d28e5ed66c4b97c85deaf3caa8dd40a508eaf715d63772e6ef0020b0 SHA512 a45db7ea9453e2afe0ff61ed6608925e94f9202dc1fbee5e2b88a5a1c16310019cb4611090f8234ad6ebc46a6519a36085683c4553d47bc9c21b8ef0c13ab540
DIST fox-1.7.84.tar.gz 5879987 BLAKE2B 803a698eb5d976a04dd30b03a3c65f840d09e173292b8448dc02905b37ea352d0fe71b4a35f806f7ee2a8b6e6436b0c1dc9185ac3a17ecda3fb63a1b583e7348 SHA512 5590f16272a0630cb49e74e0f591e65886dd81ba1b0121d403fa3689ca8b23a727c75b645b417eb87e67fd0ece465b493146c8bb51d117a6559bb19b1b2b4297
DIST fox-1.7.85.tar.gz 5912948 BLAKE2B ba9b224212efd91e4643e4f97bfd571802c48bf379239a4f580f820e1f6d8c8d55c321febfd42b4dfc7b366715e893365cd198c4cb9c22c5fb8c525b16b1f888 SHA512 7a67d564c69ddac1a9dec62837943ec7aabd951c72715ac12300f728f0fad3365e39cdbf7fe1ab31e0ae8cf11381d62eaeb3edb64d1773d4cd2279db4fd280d8

View File

@@ -0,0 +1,17 @@
fix from snapshot
prevent:
> /usr/include/fox-1.7/FXObject.h:54:28: error: FXSelector in namespace FX does not name a type
--- a/include/FXObject.h
+++ b/include/FXObject.h
@@ -25,6 +25,10 @@
#include "FXCallback.h"
#endif
+#ifndef FXMETACLASS_H
+#include "FXMetaClass.h"
+#endif
+
namespace FX {

View File

@@ -0,0 +1,31 @@
--- a/configure.ac
+++ b/configure.ac
@@ -65,9 +67,6 @@
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
-# Prevents setting flags.
-CXXFLAGS=""
-
# More secret source
AC_GNU_SOURCE
@@ -145,7 +144,6 @@
CXXFLAGS="${CXXFLAGS} -O2 -DNDEBUG"
if test "${GXX}" = "yes" ; then
CXXFLAGS="${CXXFLAGS} -ffast-math -fstrict-overflow -fstrict-aliasing -finline-functions -fomit-frame-pointer -fcf-protection=none -fno-stack-protector"
- LDFLAGS="-s ${LDFLAGS}"
fi
fi
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@
# For non-gcc compilers, change the options to "no-dependencies"
AUTOMAKE_OPTIONS = foreign dist-zip
-SUBDIRS = utils include lib chart doc tests shutterbug adie pathfinder calculator controlpanel glviewer windows
+SUBDIRS = utils include lib chart doc tests shutterbug adie pathfinder calculator controlpanel glviewer
EXTRA_DIST = ADDITIONS AUTHORS INSTALL LICENSE LICENSE_ADDENDUM TRACING README fox.spec fox-config index.html aclocal.m4
bin_SCRIPTS = fox-config

View File

@@ -0,0 +1,27 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,10 @@
# For non-gcc compilers, change the options to "no-dependencies"
AUTOMAKE_OPTIONS = foreign dist-zip
-SUBDIRS = utils include lib chart doc tests shutterbug adie pathfinder calculator controlpanel glviewer
+if COND_TOOLS
+ INC_TOOLS = adie calculator pathfinder shutterbug
+endif
+SUBDIRS = utils include lib chart doc tests controlpanel glviewer $(INC_TOOLS)
EXTRA_DIST = ADDITIONS AUTHORS INSTALL LICENSE LICENSE_ADDENDUM TRACING README fox.spec fox-config index.html aclocal.m4
bin_SCRIPTS = fox-config
--- a/configure.ac
+++ b/configure.ac
@@ -51,6 +51,10 @@
LT_AGE=`expr $FOX_INTERFACE_VERSION - $FOX_BINARY_VERSION`
LT_INIT([win32-dll])
+AC_ARG_WITH(tools,[ --with-tools choices are yes, no])
+AC_MSG_RESULT([$with_tools])
+AM_CONDITIONAL(COND_TOOLS, test "x$with_tools" != "xno")
+
# Check win32 compile
case "$host_os" in
*mingw32*) OS_WINDOWS=1 ;;

View File

@@ -0,0 +1,120 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools flag-o-matic
DESCRIPTION="C++ Toolkit for developing Graphical User Interfaces easily and effectively"
HOMEPAGE="http://www.fox-toolkit.org/"
SRC_URI="ftp://www.fox-toolkit.org/pub/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="1.7"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
IUSE="+bzip2 +jpeg +opengl tiff +truetype +zlib debug doc profile tools"
COMMON_DEPEND="
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libXcursor
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXi
x11-libs/libXrandr
x11-libs/libXrender
bzip2? ( app-arch/bzip2 )
jpeg? ( media-libs/libjpeg-turbo:= )
opengl? ( virtual/glu virtual/opengl )
tiff? ( media-libs/tiff:= )
truetype? (
media-libs/fontconfig
media-libs/freetype:2
x11-libs/libXft
)
zlib? ( sys-libs/zlib )
"
RDEPEND="
${COMMON_DEPEND}
x11-libs/fox-wrapper
"
DEPEND="
${COMMON_DEPEND}
x11-base/xorg-proto
x11-libs/libXt
"
BDEPEND="doc? ( app-text/doxygen )"
PATCHES=(
"${FILESDIR}"/${PN}-1.7.84-pthread_rwlock_prefer_writer_np-musl.patch
"${FILESDIR}"/${PN}-1.7.85-sanitize.patch
"${FILESDIR}"/${PN}-1.7.85-tools.patch
# fix from snapshot-1.7.86. to remove in the next release.
"${FILESDIR}"/${PN}-1.7.85-fix-metaclass-header.patch
)
src_prepare() {
default
eautoreconf
}
src_configure() {
# -Werror=strict-aliasing (bug #864412, bug #940648)
# Do not trust it for LTO either.
append-flags -fno-strict-aliasing
filter-lto
use debug || append-cppflags -DNDEBUG
# Not using --enable-release because of the options it sets like no SSP
econf \
$(use_enable debug) \
$(use_enable bzip2 bz2lib) \
$(use_enable jpeg) \
$(use_with opengl) \
$(use_enable tiff) \
$(use_with truetype xft) \
$(use_enable zlib) \
$(use_with profile profiling) \
$(use_with tools)
}
src_compile() {
emake
use doc && emake -C doc docs
}
src_install() {
emake install \
DESTDIR="${D}" \
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
artdir="${EPREFIX}"/usr/share/doc/${PF}/html/art \
screenshotsdir="${EPREFIX}"/usr/share/doc/${PF}/html/screenshots
local CP="${ED}"/usr/bin/ControlPanel
if [[ -f ${CP} ]]; then
mv "${CP}" "${ED}"/usr/bin/fox-ControlPanel-${SLOT} || \
die "Failed to install ControlPanel"
fi
dodoc ADDITIONS AUTHORS LICENSE_ADDENDUM README TRACING
if use doc; then
# install class reference docs if USE=doc
docinto html
dodoc -r doc/ref
else
# remove documentation if USE=-doc
rm -rf "${ED}"/usr/share/doc/${PF}/html || die
fi
# slot fox-config
if [[ -f ${ED}/usr/bin/fox-config ]] ; then
mv "${ED}"/usr/bin/fox-config "${ED}"/usr/bin/fox-${SLOT}-config \
|| die "failed to install fox-config"
fi
# no static archives
find "${D}" -name '*.la' -delete || die
}