Name: efltk Version: 2.0.8 Release: 1 Summary: A stable, small and fast cross-platform GUI ToolKit URL: http://ede.sourceforge.net License: LGPLv2+ Group: System/Libraries Source0: %{name}-%{version}.tar.gz Patch0: %{name}-%{version}-aix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: fontconfig-devel >= 2.8.0-1 BuildRequires: freetype2-devel >= 2.3.12-1 BuildRequires: gettext BuildRequires: libjpeg-devel >= 6b-7 BuildRequires: libpng-devel >= 1.2.46-1 BuildRequires: libXft-devel >= 2.1.4-1 BuildRequires: libXrender-devel >= 0.9.5-1 BuildRequires: zlib-devel >= 1.2.3-3 Requires: fontconfig >= 2.8.0-1 Requires: freetype2 >= 2.3.12-1 Requires: gettext Requires: libjpeg >= 6b-7 Requires: libpng >= 1.2.46-1 Requires: libXft >= 2.1.4-1 Requires: libXrender >= 0.9.5-1 Requires: zlib >= 1.2.3-3 %description Extended Fast Light Toolkit (eFLTK) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. eFLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation. It is currently maintained by a small group of developers across the world with a central repository on SourceForge. %package devel Summary: Header files and libraries for developing apps which will eFLTK Group: Development/C++ Requires: %{name} = %{version}-%{release} %description devel The efltk-devel package contains the header files and libraries needed to develop programs that use the eFLTK libraries. %package themes Summary: Themes for eFLTK Group: System/Libraries Requires: %{name} = %{version}-%{release} %description themes This package contains themes which can be used with eFLTK. Note: in version 2.0.2 these themes don't seem to work. %package -n ecalc Summary: Scientific calculator for EDE Group: Graphical desktop/Other Requires: %{name} = %{version}-%{release} %description -n ecalc Ecalc is a scientific calculator for the Equinox Desktop Environment, made as a demo of eFLTK toolkit. %package -n efluid Summary: GUI designer for EDE / eFLTK Group: Development/C++ Requires: %{name} = %{version}-%{release} %description -n efluid Efluid is a WYSIWYG GUI designer for the eFLTK toolkit. It can generate C++ code and export strings for translation in gettext format. It is still under development which means that it doesn't support some of the features of eFLTK. %package -n etranslate Summary: Program interface translation tool for EDE Group: Development/Other Requires: %{name} = %{version}-%{release} %description -n etranslate Etranslate is an editor of gettext (.PO) files. This format is commonly used in open-source projects such as EDE to enable localization of programs. %prep %setup -q -n %{name} %patch0 %build CC="xlc_r" CXX="xlC_r" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --disable-shared -enable-static \ --enable-xdbe \ --enable-xft \ --enable-opengl \ --enable-plugins \ --enable-utf8 \ --enable-nls \ --disable-unixODBC \ --disable-mysql make %{?_smp_mflags} # # convert all static libraries into shared ones # rpath="-blibpath:/opt/freeware/lib:/usr/lib:/lib" build_shlib() { i=$1 CreateExportList -X32 ${i}.exp ${i}.a ${CXX} -qmkshrobj ${i}.a -o shr.o -bE:${i}.exp ${rpath} ${deplibs} -bernotok /usr/bin/rm -f ${i}.exp /usr/bin/rm -f ${i}.a # now create the AIX-style shared library /usr/bin/ar -X32 -rv ${i}.a shr.o /usr/bin/rm -f shr.o } cd lib deplibs="-lX11 -lXext -L/opt/freeware/lib -lXft -lfontconfig" build_shlib libefltk deplibs="-lX11 -lGL -L. -lefltk" build_shlib libefltk_gl deplibs="-L. -lefltk -L/opt/freeware/lib -lpng -ljpeg" build_shlib libefltk_images deplibs="-L. -lefltk" build_shlib libefltk_xml mkdir SAVE cp lib*.a SAVE/ cd ../bin /usr/bin/rm -f e* cd .. # rebuild tools to get proper shared libraries into the binaries cd tools make FLLIB="-L/opt/freeware/lib -lefltk" FLGLLIB="-L/opt/freeware/lib -lefltk_gl" FLIMAGESLIB="-L/opt/freeware/lib -lefltk_images" FLXMLLIB="-L/opt/freeware/lib -lefltk_xml" FLNETLIB="-L/opt/freeware/lib -lefltk_net" cd .. # build themes cd themes make THEMECOMMAND="xlC_r" essai.shared.o eblue.shared.o motif.shared.o deplibs="-lX11 -lXext -L/opt/freeware/lib -lefltk -lXft -lfontconfig" for i in essai eblue motif ; do CreateExportList -X32 ${i}.exp ${i}.shared.o ${CXX} -qmkshrobj ${i}.shared.o -o ${i}.theme -bE:${i}.exp ${rpath} ${deplibs} -bernotok done %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make install prefix=${RPM_BUILD_ROOT}%{_prefix} FLLIB="-L/opt/freeware/lib -lefltk" FLGLLIB="-L/opt/freeware/lib -lefltk_gl" FLIMAGESLIB="-L/opt/freeware/lib -lefltk_images" FLXMLLIB="-L/opt/freeware/lib -lefltk_xml" FLNETLIB="-L/opt/freeware/lib -lefltk_net" /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : # cp our saved AIX shared libraries, this installation is so broken :-( rm -f ${RPM_BUILD_ROOT}%{_libdir}/lib*.a cp lib/SAVE/*.a ${RPM_BUILD_ROOT}%{_libdir}/ # install themes mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/%{name} cp themes/*.theme ${RPM_BUILD_ROOT}%{_libdir}/%{name}/ # make symbolic links ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %{_libdir}/*.a %{_datadir}/locale/*/*/* /usr/lib/*.a %files devel %defattr(-,root,system) %doc doc/* %{_bindir}/efltk-config %{_includedir}/* /usr/bin/efltk-config /usr/include/* %files themes %defattr(-,root,system) %{_libdir}/%{name} %files -n ecalc %defattr(-,root,system) %{_bindir}/ecalc /usr/bin/ecalc %files -n efluid %defattr(-,root,system) %{_bindir}/efluid /usr/bin/efluid %files -n etranslate %defattr(-,root,system) %{_bindir}/etranslate /usr/bin/etranslate %changelog * Tue Dec 11 2012 Michael Perzl - 2.0.8-1 - first version for AIX5L v5.1 and higher