| 1 | # Note: this .spec is borrowed from git://pkgs.fedoraproject.org/rpms/fontconfig.git
|
|---|
| 2 |
|
|---|
| 3 | # OS/2 rpm macros don't define this (yet), do it manually:
|
|---|
| 4 | %global _fontconfig_masterdir %{_sysconfdir}/fonts
|
|---|
| 5 | %global _fontconfig_confdir %{_sysconfdir}/fonts/conf.d
|
|---|
| 6 | %global _fontconfig_templatedir %{_datadir}/fontconfig/conf.avail
|
|---|
| 7 |
|
|---|
| 8 | %global freetype_version 2.1.4
|
|---|
| 9 |
|
|---|
| 10 | Summary: Font configuration and customization library
|
|---|
| 11 | Name: fontconfig
|
|---|
| 12 | Version: 2.12.1
|
|---|
| 13 | Release: 2%{?dist}
|
|---|
| 14 | # src/ftglue.[ch] is in Public Domain
|
|---|
| 15 | # src/fccache.c contains Public Domain code
|
|---|
| 16 | # fc-case/CaseFolding.txt is in the UCD
|
|---|
| 17 | # otherwise MIT
|
|---|
| 18 | License: MIT and Public Domain and UCD
|
|---|
| 19 | Group: System Environment/Libraries
|
|---|
| 20 | #Source: http://fontconfig.org/release/%{name}-%{version}.tar.bz2
|
|---|
| 21 | URL: http://fontconfig.org
|
|---|
| 22 | Vendor: bww bitwise works GmbH
|
|---|
| 23 |
|
|---|
| 24 | %define svn_url http://svn.netlabs.org/repos/ports/fontconfig/trunk
|
|---|
| 25 | %define svn_rev 1839
|
|---|
| 26 |
|
|---|
| 27 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
|---|
| 28 |
|
|---|
| 29 | BuildRequires: gcc make subversion zip
|
|---|
| 30 |
|
|---|
| 31 | Source1: 30-os2-unsupported.conf
|
|---|
| 32 | Source2: 80-os2-tnr-fix.conf
|
|---|
| 33 |
|
|---|
| 34 | BuildRequires: expat-devel
|
|---|
| 35 | BuildRequires: freetype-devel >= %{freetype_version}
|
|---|
| 36 | #BuildRequires: fontpackages-devel
|
|---|
| 37 | BuildRequires: autoconf automake libtool
|
|---|
| 38 | BuildRequires: python python-lxml
|
|---|
| 39 | BuildRequires: python-six
|
|---|
| 40 |
|
|---|
| 41 | #Requires: fontpackages-filesystem
|
|---|
| 42 | Requires: freetype
|
|---|
| 43 | Requires(pre): freetype
|
|---|
| 44 | Requires(post): grep coreutils
|
|---|
| 45 | #Requires: font(:lang=en)
|
|---|
| 46 |
|
|---|
| 47 | # @todo Temporary enforce dependency on the legacy package (that was previously named
|
|---|
| 48 | # fontconfig) to have it installed. This should be dropped at some point.
|
|---|
| 49 | Requires: fontconfig-legacy
|
|---|
| 50 |
|
|---|
| 51 | %description
|
|---|
| 52 | Fontconfig is designed to locate fonts within the
|
|---|
| 53 | system and select them according to requirements specified by
|
|---|
| 54 | applications.
|
|---|
| 55 |
|
|---|
| 56 | %package devel
|
|---|
| 57 | Summary: Font configuration and customization library
|
|---|
| 58 | Group: Development/Libraries
|
|---|
| 59 | Requires: %{name} = %{version}-%{release}
|
|---|
| 60 | Requires: freetype-devel >= %{freetype_version}
|
|---|
| 61 | Requires: pkgconfig
|
|---|
| 62 |
|
|---|
| 63 | %description devel
|
|---|
| 64 | The fontconfig-devel package includes the header files,
|
|---|
| 65 | and developer docs for the fontconfig package.
|
|---|
| 66 |
|
|---|
| 67 | Install fontconfig-devel if you want to develop programs which
|
|---|
| 68 | will use fontconfig.
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 | %package devel-doc
|
|---|
| 72 | Summary: Development Documentation files for fontconfig library
|
|---|
| 73 | Group: Documentation
|
|---|
| 74 | BuildArch: noarch
|
|---|
| 75 | Requires: %{name}-devel = %{version}-%{release}
|
|---|
| 76 |
|
|---|
| 77 | %description devel-doc
|
|---|
| 78 | The fontconfig-devel-doc package contains the documentation files
|
|---|
| 79 | which is useful for developing applications that uses fontconfig.
|
|---|
| 80 |
|
|---|
| 81 | %debug_package
|
|---|
| 82 |
|
|---|
| 83 | %prep
|
|---|
| 84 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 85 | %setup -q
|
|---|
| 86 | %else
|
|---|
| 87 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 88 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 89 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 90 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 91 | %endif
|
|---|
| 92 |
|
|---|
| 93 | # Generate configure and friends
|
|---|
| 94 | autoreconf -fvi
|
|---|
| 95 |
|
|---|
| 96 | %build
|
|---|
| 97 | # We don't want to rebuild the docs, but we want to install the included ones.
|
|---|
| 98 | export HASDOCBOOK=no
|
|---|
| 99 | export CFLAGS="%{optflags}"
|
|---|
| 100 | export LDFLAGS="-Zomf -Zhigh-mem"
|
|---|
| 101 | export LIBS="-lcx"
|
|---|
| 102 | export VENDOR="%{vendor}"
|
|---|
| 103 |
|
|---|
| 104 | %configure \
|
|---|
| 105 | --with-add-fonts=%{_prefix}/local/share/fonts,%{_datadir}/fonts \
|
|---|
| 106 | --disable-static
|
|---|
| 107 |
|
|---|
| 108 | make %{?_smp_mflags} V=1
|
|---|
| 109 |
|
|---|
| 110 | %install
|
|---|
| 111 | rm -rf "$RPM_BUILD_ROOT"
|
|---|
| 112 | make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
|
|---|
| 113 |
|
|---|
| 114 | find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
|
|---|
| 115 |
|
|---|
| 116 | # install OS/2-specific configs and activate them
|
|---|
| 117 | install -p -m 0644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_fontconfig_templatedir}/
|
|---|
| 118 | ln -s %{_fontconfig_templatedir}/30-os2-unsupported.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/
|
|---|
| 119 | ln -s %{_fontconfig_templatedir}/80-os2-tnr-fix.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/
|
|---|
| 120 |
|
|---|
| 121 | # move installed doc files back to build directory to package them
|
|---|
| 122 | # in the right place
|
|---|
| 123 | mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* .
|
|---|
| 124 | rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/
|
|---|
| 125 |
|
|---|
| 126 | %check
|
|---|
| 127 | # @todo Some tests will fail if there is no working system config (upstream bug)
|
|---|
| 128 | if [ -f "%{_fontconfig_masterdir}/fonts.conf" ] ; then
|
|---|
| 129 | # this export is needed, as else the dll for the tests are not found
|
|---|
| 130 | export BEGINLIBPATH=%{_builddir}/%{buildsubdir}/src/.libs
|
|---|
| 131 | #make check
|
|---|
| 132 | fi
|
|---|
| 133 |
|
|---|
| 134 | %post
|
|---|
| 135 |
|
|---|
| 136 | umask 0022
|
|---|
| 137 |
|
|---|
| 138 | mkdir -p %{_localstatedir}/cache/fontconfig
|
|---|
| 139 |
|
|---|
| 140 | # Force regeneration of all fontconfig cache files
|
|---|
| 141 | rm -rf %{_localstatedir}/cache/fontconfig/*
|
|---|
| 142 | BEGINLIBPATH="$(echo %{_libdir} | sed -re 's,/@unixroot,'$UNIXROOT',g' -e 's,/,\\,g');$BEGINLIBPATH" \
|
|---|
| 143 | LIBPATHSTRICT=T \
|
|---|
| 144 | %{_bindir}/fc-cache -f
|
|---|
| 145 |
|
|---|
| 146 | %postun
|
|---|
| 147 |
|
|---|
| 148 | #%transfiletriggerin -- %{_prefix}/local/share/fonts %{_datadir}/fonts
|
|---|
| 149 | #%{_bindir}/fc-cache -s
|
|---|
| 150 |
|
|---|
| 151 | #%transfiletriggerpostun -- %{_prefix}/local/share/fonts %{_datadir}/fonts
|
|---|
| 152 | #%{_bindir}/fc-cache -s
|
|---|
| 153 |
|
|---|
| 154 | %files
|
|---|
| 155 | %doc README AUTHORS
|
|---|
| 156 | %doc fontconfig-user.txt fontconfig-user.html
|
|---|
| 157 | %doc %{_fontconfig_confdir}/README
|
|---|
| 158 | %{!?_licensedir:%global license %%doc}
|
|---|
| 159 | %license COPYING
|
|---|
| 160 | %{_libdir}/fntcnf*.dll
|
|---|
| 161 | %{_bindir}/fc-cache.exe
|
|---|
| 162 | %{_bindir}/fc-cat.exe
|
|---|
| 163 | %{_bindir}/fc-list.exe
|
|---|
| 164 | %{_bindir}/fc-match.exe
|
|---|
| 165 | %{_bindir}/fc-pattern.exe
|
|---|
| 166 | %{_bindir}/fc-query.exe
|
|---|
| 167 | %{_bindir}/fc-scan.exe
|
|---|
| 168 | %{_bindir}/fc-validate.exe
|
|---|
| 169 | %{_fontconfig_templatedir}/*.conf
|
|---|
| 170 | %{_datadir}/xml/fontconfig
|
|---|
| 171 | # fonts.conf is not supposed to be modified.
|
|---|
| 172 | # If you want to do so, you should use local.conf instead.
|
|---|
| 173 | %config %{_fontconfig_masterdir}/fonts.conf
|
|---|
| 174 | %config(noreplace) %{_fontconfig_confdir}/*.conf
|
|---|
| 175 | %dir %{_localstatedir}/cache/fontconfig
|
|---|
| 176 | %{_mandir}/man1/*
|
|---|
| 177 | %{_mandir}/man5/*
|
|---|
| 178 |
|
|---|
| 179 | %files devel
|
|---|
| 180 | %{_libdir}/fontconfig*.a
|
|---|
| 181 | %{_libdir}/pkgconfig/*
|
|---|
| 182 | %{_includedir}/fontconfig
|
|---|
| 183 | %{_mandir}/man3/*
|
|---|
| 184 |
|
|---|
| 185 | %files devel-doc
|
|---|
| 186 | %doc fontconfig-devel.txt fontconfig-devel
|
|---|
| 187 |
|
|---|
| 188 | %changelog
|
|---|
| 189 | * Fri Nov 25 2016 Silvan Scherrer <silvan.scherrer@aroa.com> 2.12.1-2
|
|---|
| 190 | - add buildlevel information to the dll
|
|---|
| 191 |
|
|---|
| 192 | * Tue Oct 25 2016 Silvan Scherrer <silvan.scherrer@aroa.com> 2.12.1-1
|
|---|
| 193 | - Update to version 2.12.1.
|
|---|
| 194 |
|
|---|
| 195 | * Sat Apr 23 2016 Dmitriy Kuminov <coding@dmik.org> 2.11.95-1
|
|---|
| 196 | - Update to version 2.11.95.
|
|---|
| 197 | - Fix selecting Type 1 fonts from OS/2 PM font registry.
|
|---|
| 198 | - Add aliases for system OS/2 fonts not reconginzed by FreeType
|
|---|
| 199 | (this includes Tms Rmn, Helv and Times New Roman MT 30).
|
|---|
| 200 | - Remove trailing space from Times New Roman Type 1 system font.
|
|---|
| 201 | - Temporarily disable assertions that sometimes abort Firefox at exit.
|
|---|
| 202 |
|
|---|
| 203 | * Tue Mar 1 2016 Dmitriy Kuminov <coding@dmik.org> 2.11.94-2
|
|---|
| 204 | - Allow loading DLL into high memory.
|
|---|
| 205 |
|
|---|
| 206 | * Mon Dec 14 2015 Dmitriy Kuminov <coding@dmik.org> 2.11.94-1
|
|---|
| 207 | - Initial package for version 2.11.94.
|
|---|