Package init

This commit is contained in:
overweight 2019-09-30 10:38:57 -04:00
commit 2196a5ce60
5 changed files with 204 additions and 0 deletions

BIN
fltk-1.3.4-1-source.tar.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,58 @@
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@"
# flags for C++ compiler:
ARCHFLAGS="@ARCHFLAGS@"
-CFLAGS="@CFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@"
-CXXFLAGS="@CXXFLAGS@ @LARGEFILE@ @PTHREAD_FLAGS@"
+CFLAGS=""
+CXXFLAGS=""
LDFLAGS="@LDFLAGS@"
LDLIBS="@LIBS@"
OPTIM="@OPTIM@"
@@ -228,7 +228,7 @@ if test "$BINARY_DIR" != ""; then
includes="-I$BINARY_DIR $includes"
fi
-if test "$libdir" != /usr/lib -a "$libdir" != /usr/lib32; then
+if test "$libdir" != /usr/lib -a "$libdir" != /usr/lib32 -a "$libdir" != /usr/lib64; then
libs=-L$libdir
else
libs=
@@ -236,28 +236,28 @@ fi
# Calculate needed libraries
LDSTATIC="$libdir/libfltk.a $LDLIBS"
-LDLIBS="-lfltk$SHAREDSUFFIX $LDLIBS"
+LDLIBS="-lfltk$SHAREDSUFFIX"
if test x$use_forms = xyes; then
LDLIBS="-lfltk_forms$SHAREDSUFFIX $LDLIBS"
LDSTATIC="$libdir/libfltk_forms.a $LDSTATIC"
fi
if test x$use_gl = xyes; then
- LDLIBS="-lfltk_gl$SHAREDSUFFIX @GLLIB@ $LDLIBS"
+ LDLIBS="-lfltk_gl$SHAREDSUFFIX $LDLIBS"
LDSTATIC="$libdir/libfltk_gl.a @GLLIB@ $LDSTATIC"
fi
if test x$use_images = xyes; then
- LDLIBS="-lfltk_images$SHAREDSUFFIX $IMAGELIBS $LDLIBS"
+ LDLIBS="-lfltk_images$SHAREDSUFFIX $LDLIBS"
LDSTATIC="$libdir/libfltk_images.a $STATICIMAGELIBS $LDSTATIC"
fi
if test x$use_cairo = xyes; then
- LDLIBS="-lfltk_cairo$SHAREDSUFFIX $CAIROLIBS $LDLIBS"
+ LDLIBS="-lfltk_cairo$SHAREDSUFFIX $LDLIBS"
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

View File

@ -0,0 +1,21 @@
diff -up fltk-1.3.4-1/fluid/Makefile.x-fluid_mimetype fltk-1.3.4-1/fluid/Makefile
--- fltk-1.3.4-1/fluid/Makefile.x-fluid_mimetype 2016-07-17 14:51:54.000000000 -0500
+++ fltk-1.3.4-1/fluid/Makefile 2017-03-04 12:42:00.573346286 -0600
@@ -84,7 +84,7 @@ install-linux:
$(INSTALL_DATA) icons/fluid-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/fluid.png; \
done
-$(INSTALL_DIR) $(DESTDIR)/usr/share/mimelnk/application
- $(INSTALL_DATA) x-fluid.desktop $(DESTDIR)/usr/share/mimelnk/application
+ #$(INSTALL_DATA) x-fluid.desktop $(DESTDIR)/usr/share/mimelnk/application
install-osx:
echo Installing Fluid in $(DESTDIR)/Applications...
@@ -104,7 +104,7 @@ uninstall:
uninstall-linux:
$(RM) $(DESTDIR)/usr/share/applications/fluid.desktop
$(RM) $(DESTDIR)/usr/share/icons/hicolor/*/fluid.png
- $(RM) $(DESTDIR)/usr/share/mimelnk/application/x-fluid.desktop
+ #$(RM) $(DESTDIR)/usr/share/mimelnk/application/x-fluid.desktop
uninstall-osx:
$(RM) -r $(DESTDIR)/Applications/fluid.app

3
fltk-config.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
exec fltk-config-$(uname -i) "$@"

122
fltk.spec Normal file
View File

@ -0,0 +1,122 @@
%global _changelog_trimtime %(date +%s -d "1 year ago")
Name: fltk
Version: 1.3.4
Release: 8
Summary: C++ user interface toolkit
License: LGPLv2+ with exceptions
URL: http://www.fltk.org/
Source0: http://fltk.org/pub/fltk/1.3.4/fltk-1.3.4-1-source.tar.gz
Source1: fltk-config.sh
#PATCH-FIX-https://bugzilla.redhat.com/
Patch0001: fltk-1.3.4-fltk_config.patch
#PATCH-FIX-https://bugzilla.redhat.com/
Patch0002: fltk-1.3.4-x-fluid_mimetype.patch
Provides: %{name}-static %{name}-fluid
Obsoletes: %{name}-static %{name}-fluid
BuildRequires: gcc-c++ desktop-file-utils libjpeg-devel pkgconfig(libpng) pkgconfig(gl) pkgconfig(glu) pkgconfig(ice)
BuildRequires: pkgconfig(sm) pkgconfig(xext) pkgconfig(xinerama) pkgconfig(xft) pkgconfig(xt) pkgconfig(x11)
BuildRequires: pkgconfig(xcursor) pkgconfig(xproto) xorg-x11-utils zlib-devel autoconf gdb
%description
FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit.It provides modern GUI functionality without
the bloat, and supports 3D graphics via OpenGL and its built-in GLUT emulation.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release} libstdc++-devel pkgconfig(gl) pkgconfig(glu)
Requires: pkgconfig(ice) pkgconfig(sm) pkgconfig(xft) pkgconfig(xt) pkgconfig(x11)
%description devel
The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11),
Microsoft(r) Windows(r), and MacOS(r) X. FLTK provides modern GUI functionality without the bloat and supports 3D
graphics via OpenGL(r) and its built-in GLUT emulation. It was originally developed by Mr. Bill Spitzak and is
currently maintained by a small group of developers across the world with a central repository
%package help
Summary: Documents for autogen
Buildarch: noarch
Requires: man
%description help
Man pages and other related documents.
%prep
%autosetup -n %{name}-%{version}-1 -p1
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
%make_build
%install
%make_install
make install-linux -C fluid DESTDIR=$RPM_BUILD_ROOT
# we only apply this hack to multilib arch's
%ifarch x86_64
%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
rm -rf __docs
mv $RPM_BUILD_ROOT%{_docdir}/fltk __docs
rm -rv $RPM_BUILD_ROOT%{_mandir}/cat*
%check
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/fluid.desktop
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc ANNOUNCEMENT CHANGES CREDITS README
%license COPYING
%{_libdir}/*.so.*
%{_bindir}/fluid
%{_datadir}/applications/fluid.desktop
%{_datadir}/icons/hicolor/*/*/*
%files devel
%{_bindir}/fltk-config
%{?arch:%{_bindir}/fltk-config-%{arch}}
%{_includedir}/FL/
%{_includedir}/Fl
%{_libdir}/*.so
%{_libdir}/*.a
%files help
%{_mandir}/man1/fltk-config.1*
%{_mandir}/man3/fltk.3*
%{_mandir}/man1/fluid.1*
%doc __docs/*
%changelog
* Wed Sep 11 2019 openEuler jimmy<dukaitian@huawei.com> - 1.3.4-8
- Package init jimmy