Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade: fltk version to 1.3.8 #11267

Open
wants to merge 2 commits into
base: 3.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions SPECS-EXTENDED/fltk/fltk-1.3.4-fltk_config.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
diff -up fltk-1.3.4-1/fltk-config.in.fltk_config fltk-1.3.4-1/fltk-config.in
--- fltk-1.3.4-1/fltk-config.in.fltk_config 2016-01-30 20:49:56.000000000 -0600
+++ fltk-1.3.4-1/fltk-config.in 2017-03-04 12:29:28.910316677 -0600
@@ -44,8 +44,8 @@ CXX="@CXX@"
Index: fltk-1.3.6/fltk-config.in
===================================================================
--- fltk-1.3.6.orig/fltk-config.in
+++ fltk-1.3.6/fltk-config.in
@@ -42,8 +42,8 @@ CXX="@CXX@"

# flags for C++ compiler:
ARCHFLAGS="@ARCHFLAGS@"
Expand All @@ -12,7 +13,7 @@ diff -up fltk-1.3.4-1/fltk-config.in.fltk_config fltk-1.3.4-1/fltk-config.in
LDFLAGS="@LDFLAGS@"
LDLIBS="@LIBS@"
OPTIM="@OPTIM@"
@@ -228,7 +228,7 @@ if test "$BINARY_DIR" != ""; then
@@ -226,7 +226,7 @@ if test "$BINARY_DIR" != ""; then
includes="-I$BINARY_DIR $includes"
fi

Expand All @@ -21,7 +22,7 @@ diff -up fltk-1.3.4-1/fltk-config.in.fltk_config fltk-1.3.4-1/fltk-config.in
libs=-L$libdir
else
libs=
@@ -236,28 +236,28 @@ fi
@@ -234,23 +234,23 @@ fi

# Calculate needed libraries
LDSTATIC="$libdir/libfltk.a $LDLIBS"
Expand All @@ -33,9 +34,9 @@ diff -up fltk-1.3.4-1/fltk-config.in.fltk_config fltk-1.3.4-1/fltk-config.in
LDSTATIC="$libdir/libfltk_forms.a $LDSTATIC"
fi
if test x$use_gl = xyes; then
- LDLIBS="-lfltk_gl$SHAREDSUFFIX @GLLIB@ $LDLIBS"
- LDLIBS="-lfltk_gl$SHAREDSUFFIX @GLLIBS@ $LDLIBS"
+ LDLIBS="-lfltk_gl$SHAREDSUFFIX $LDLIBS"
LDSTATIC="$libdir/libfltk_gl.a @GLLIB@ $LDSTATIC"
LDSTATIC="$libdir/libfltk_gl.a @GLLIBS@ $LDSTATIC"
fi
if test x$use_images = xyes; then
- LDLIBS="-lfltk_images$SHAREDSUFFIX $IMAGELIBS $LDLIBS"
Expand All @@ -49,10 +50,3 @@ diff -up fltk-1.3.4-1/fltk-config.in.fltk_config fltk-1.3.4-1/fltk-config.in
LDSTATIC="$libdir/libfltk_cairo.a $CAIROLIBS $LDSTATIC"
fi

-LDLIBS="$DSOLINK $LDFLAGS $libs $LDLIBS"
-LDSTATIC="$LDFLAGS $LDSTATIC"
+LDLIBS="$libs $LDLIBS"
+#LDSTATIC="$LDFLAGS $LDSTATIC"

# Answer to user requests
if test -n "$echo_help"; then
21 changes: 0 additions & 21 deletions SPECS-EXTENDED/fltk/fltk-1.3.4-x-fluid_mimetype.patch

This file was deleted.

13 changes: 13 additions & 0 deletions SPECS-EXTENDED/fltk/fltk-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: fltk-1.3.6/CMake/setup.cmake
===================================================================
--- fltk-1.3.6.orig/CMake/setup.cmake
+++ fltk-1.3.6/CMake/setup.cmake
@@ -62,7 +62,7 @@ if (WIN32 AND NOT CYGWIN)
elseif (APPLE AND NOT OPTION_APPLE_X11)
set (FLTK_CONFIG_PATH FLTK.framework/Resources/CMake)
else ()
- set (FLTK_CONFIG_PATH ${FLTK_DATADIR}/fltk)
+ set (FLTK_CONFIG_PATH ${FLTK_DATADIR}/fltk CACHE FILEPATH "Install location for cmake files.")
endif (WIN32 AND NOT CYGWIN)

include(TestBigEndian)
4 changes: 2 additions & 2 deletions SPECS-EXTENDED/fltk/fltk-config.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/bash

exec fltk-config-$(uname -i) "$@"
exec fltk-config-$(uname -m) "$@"
4 changes: 2 additions & 2 deletions SPECS-EXTENDED/fltk/fltk.signatures.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Signatures": {
"fltk-1.3.5-source.tar.gz": "8729b2a055f38c1636ba20f749de0853384c1d3e9d1a6b8d4d1305143e115702",
"fltk-config.sh": "7f2d5f899bcc6f91bb487190254734cbf132414b7d488bd0a12b3be1b1a0c18f"
"fltk-1.3.8-source.tar.gz": "f3c1102b07eb0e7a50538f9fc9037c18387165bc70d4b626e94ab725b9d4d1bf",
"fltk-config.sh": "c0fec61f27ea65e3fc373fb530f6ba2c5227daaec6f8483bd93a0b3497808173"
}
}
117 changes: 47 additions & 70 deletions SPECS-EXTENDED/fltk/fltk.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,35 @@ Distribution: Azure Linux

Summary: C++ user interface toolkit
Name: fltk
Version: 1.3.5
Release: 4%{?dist}
Version: 1.3.8
Release: 1%{?dist}

# see COPYING (or http://www.fltk.org/COPYING.php ) for exceptions details
License: LGPLv2+ with exceptions
URL: http://www.fltk.org/

%if "%{?snap:1}" == "1"
Source0: http://ftp.easysw.com/pub/fltk/snapshots/fltk-1.3.x-%{snap}.tar.bz2
%else
Source0: http://fltk.org/pub/%{name}/%{version}/%{name}-%{version}-source.tar.gz
%endif

URL: https://www.fltk.org/
Source0: https://www.fltk.org/pub/%{name}/%{version}/%{name}-%{version}-source.tar.gz
Source1: fltk-config.sh

Patch0: fltk-cmake.patch
## FIXME/TODO: upstream these asap -- Rex
# add lib64 support, drop extraneous libs (bug #708185) and ldflags (#1112930)
Patch1: fltk-1.3.4-fltk_config.patch

## upstream patches

## upstreamable patches
Patch100: fltk-1.3.4-x-fluid_mimetype.patch

BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: desktop-file-utils
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(gl) pkgconfig(glu)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(xext) pkgconfig(xinerama) pkgconfig(xft) pkgconfig(xt) pkgconfig(x11)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xproto)
BuildRequires: xorg-x11-utils
BuildRequires: zlib-devel
BuildRequires: autoconf
BuildRequires: doxygen
#BuildRequires: fltk-fluid
#BuildRequires: texlive-latex
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(gl) pkgconfig(glu)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(xext) pkgconfig(xinerama) pkgconfig(xft) pkgconfig(xt) pkgconfig(x11)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xproto)
BuildRequires: pkgconfig(zlib)

%description
FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit.
Expand All @@ -58,9 +50,13 @@ It provides modern GUI functionality without the bloat, and supports
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: libstdc++-devel
Requires: pkgconfig(fontconfig)
Requires: pkgconfig(gl) pkgconfig(glu)
Requires: pkgconfig(ice) pkgconfig(sm)
Requires: pkgconfig(xft) pkgconfig(xt) pkgconfig(x11)
Requires: pkgconfig(libjpeg)
Requires: pkgconfig(libpng)
Requires: pkgconfig(zlib)
%description devel
%{summary}.

Expand All @@ -79,84 +75,60 @@ Requires: %{name}-devel


%prep
%if 0%{?snap:1}
%autosetup -p1 -n fltk-1.3.x-%{snap}
%else
%autosetup -p1
%endif

# verbose build output
sed -i.silent '\,^.SILENT:,d' makeinclude.in
autoconf


%build
# set DSOFLAGS too, used to link shlibs (LDFLAGS used only for static libs)
%{?__global_ldflags:DSOFLAGS="%{__global_ldflags}" ; export DSOFLAGS}

%configure \
--with-links \
--with-optim="%{optflags}" \
--disable-localjpeg \
--disable-localzlib \
--disable-localpng \
--enable-shared \
--enable-threads \
--enable-xdbe \
--enable-xinerama \
--enable-xft
%cmake -DFLTK_CONFIG_PATH:PATH=%{_libdir}/cmake/fltk \
-DOpenGL_GL_PREFERENCE=GLVND \
-DOPTION_BUILD_HTML_DOCUMENTATION:BOOL=ON \
-DOPTION_BUILD_PDF_DOCUMENTATION:BOOL=OFF \
-DOPTION_BUILD_SHARED_LIBS:BOOL=ON

%make_build
%cmake_build


%install
%make_install
%cmake_install

make install-linux -C fluid DESTDIR=$RPM_BUILD_ROOT
# Deal with license file of same name
mv src/xutf8/COPYING ./COPYING.xutf8

# we only apply this hack to multilib arch's
%ifarch x86_64 %{ix86} ppc64 ppc s390x s390 sparc64 sparc
%ifarch x86_64 %{ix86}
%global arch %(uname -i 2>/dev/null || echo undefined)
mv $RPM_BUILD_ROOT%{_bindir}/fltk-config \
$RPM_BUILD_ROOT%{_bindir}/fltk-config-%{arch}
install -p -m755 -D %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/fltk-config
%endif

# docs
rm -rf __docs
mv $RPM_BUILD_ROOT%{_docdir}/fltk __docs

## unpackaged files
# errant docs
rm -rv $RPM_BUILD_ROOT%{_mandir}/cat*


%check
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/fluid.desktop
desktop-file-validate %{buildroot}%{_datadir}/applications/fluid.desktop


%ldconfig_scriptlets

%files
%doc ANNOUNCEMENT CHANGES CREDITS README
%license COPYING
%{_libdir}/libfltk.so.1.3
%{_libdir}/libfltk_forms.so.1.3
%{_libdir}/libfltk_gl.so.1.3
%{_libdir}/libfltk_images.so.1.3
%license COPYING COPYING.xutf8
%{_libdir}/libfltk.so.1.3*
%{_libdir}/libfltk_forms.so.1.3*
%{_libdir}/libfltk_gl.so.1.3*
%{_libdir}/libfltk_images.so.1.3*

%files devel
%doc __docs/*
#%doc %{_vpath_builddir}/documentation/html
#%doc __docs/*
%{_bindir}/fltk-config
%{?arch:%{_bindir}/fltk-config-%{arch}}
%{_includedir}/FL/
%{_includedir}/Fl
%{_libdir}/libfltk.so
%{_libdir}/libfltk_forms.so
%{_libdir}/libfltk_gl.so
%{_libdir}/libfltk_images.so
%{_libdir}/cmake/fltk/
%{_mandir}/man1/fltk-config.1*
%{_mandir}/man3/fltk.3*
%{_mandir}/man6/*.6*

%files static
%{_libdir}/libfltk.a
Expand All @@ -168,10 +140,15 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/fluid.desktop
%{_bindir}/fluid
%{_mandir}/man1/fluid.1*
%{_datadir}/applications/fluid.desktop
%{_datadir}/mime/packages/fluid.xml
%{_datadir}/icons/hicolor/*/*/*


%changelog
* Fri Nov 29 2024 Jyoti Kanase <[email protected]> - 1.3.8-1
- Update to 1.3.8
- License verified

* Fri Oct 15 2021 Pawel Winogrodzki <[email protected]> - 1.3.5-4
- Initial CBL-Mariner import from Fedora 32 (license: MIT).

Expand Down
4 changes: 2 additions & 2 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3678,8 +3678,8 @@
"type": "other",
"other": {
"name": "fltk",
"version": "1.3.5",
"downloadUrl": "http://fltk.org/pub/fltk/1.3.5/fltk-1.3.5-source.tar.gz"
"version": "1.3.8",
"downloadUrl": "https://www.fltk.org/pub/fltk/1.3.8/fltk-1.3.8-source.tar.gz"
}
}
},
Expand Down
Loading