--- a/ChangeLog Mon Nov 07 16:46:07 2011 +0000
+++ b/ChangeLog Mon Nov 07 16:47:51 2011 +0000
@@ -1,3 +1,7 @@
+2011-11-07 Milan Jurik <[email protected]>
+
+ * SFEsilgraphite.spec: initial spec
+
2011-11-06 Milan Jurik <[email protected]>
* SFEliblinebreak.spec: bump to 2.1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SFEsilgraphite.spec Mon Nov 07 16:47:51 2011 +0000
@@ -0,0 +1,67 @@
+#
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+
+%include Solaris.inc
+
+%define src_name silgraphite
+
+Name: SFEsilgraphite
+IPS_Package_Name: system/library/silgraphite
+Summary: smart font system consists of an engine
+Group: System/Libraries
+Version: 2.3.1
+Source: %{sf_download}/%{src_name}/%{version}/%{src_name}-%{version}.tar.gz
+Patch1: silgraphite-01-sunstudio.diff
+URL: http://silgraphite.sourceforge.net/
+License: LGPLv2.1+
+SUNW_BaseDir: %{_basedir}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%include default-depend.inc
+
+%package devel
+Summary: %{summary} - development files
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: %name
+
+%prep
+%setup -q -n %{src_name}-%{version}
+%patch1 -p1
+
+%build
+CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+ CPUS=1
+fi
+
+export CFLAGS="%optflags"
+export LDFLAGS="%_ldflags"
+
+sh ./configure --prefix=%{_prefix} \
+ --enable-static=no \
+ --enable-shared=yes
+
+make -j$CPUS
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+rm -f %{buildroot}%{_libdir}/lib*.la
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr (-, root, bin)
+%{_bindir}
+%{_libdir}
+
+%files devel
+%defattr (-, root, bin)
+%{_includedir}
+
+%changelog
+* Mon Nov 07 2011 - Milan Jurik
+- initial spec
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/silgraphite-01-sunstudio.diff Mon Nov 07 16:47:51 2011 +0000
@@ -0,0 +1,62 @@
+--- silgraphite-2.3.1/engine/src/segment/Segment.cpp Tue Mar 18 12:29:11 2008
++++ silgraphite-2.3.1/engine/src/segment/Segment.cpp Mon Oct 31 17:25:52 2011
+@@ -345,7 +345,8 @@
+ else
+ {
+ // Rerun the processing.
+- LayoutEnvironment layout = seg.Layout();
++ LayoutEnvironment layout;
++ layout = seg.Layout();
+ layout.setStartOfLine(fStartLine);
+ layout.setEndOfLine(fEndLine);
+ ITextSource & gts = seg.getText();
+@@ -383,7 +384,8 @@
+ ----------------------------------------------------------------------------------------------*/
+ Segment * Segment::JustifiedSegment(Segment & seg, float xsNewWidth)
+ {
+- LayoutEnvironment layout(seg.Layout());
++ LayoutEnvironment layout;
++ layout = seg.Layout();
+ ITextSource & gts = seg.getText();
+
+ // Why do we have to do this?
+--- silgraphite-2.3.1/wrappers/freetype/FreetypeFont.cpp Wed Jan 21 23:36:44 2009
++++ silgraphite-2.3.1-patch/wrappers/freetype/FreetypeFont.cpp Sun Nov 6 15:56:29 2011
+@@ -133,7 +133,7 @@
+ // record the table buffer and size into a record. Note that we use the
+ // table ID as passed to this method, not the one passed to
+ // FT_Load_Sfnt_Table.
+- m_tables[tableID] = std::make_pair(pTable, tableBufferSz);
++ m_tables[tableID] = std::make_pair(pTable, (unsigned)tableBufferSz);
+ *pcbSize = tableBufferSz;
+ return pTable;
+ }
+--- silgraphite-2.3.1/wrappers/pangographite/FreetypeFont.cpp Fri May 9 13:10:30 2008
++++ silgraphite-2.3.1-patch/wrappers/pangographite/FreetypeFont.cpp Sun Nov 6 15:57:14 2011
+@@ -119,7 +119,7 @@
+ // record the table buffer and size into a record. Note that we use the
+ // table ID as passed to this method, not the one passed to
+ // FT_Load_Sfnt_Table.
+- m_tables[tableID] = std::make_pair(pTable, tableBufferSz);
++ m_tables[tableID] = std::make_pair(pTable, (unsigned)tableBufferSz);
+ *pcbSize = tableBufferSz;
+ return pTable;
+ }
+--- silgraphite-2.3.1/wrappers/pangographite/PangoTextSrc.cpp Fri May 9 13:10:30 2008
++++ silgraphite-2.3.1-patch/wrappers/pangographite/PangoTextSrc.cpp Sun Nov 6 19:00:24 2011
+@@ -17,6 +17,7 @@
+ //:>********************************************************************************************
+ // any other headers (not precompiled)
+
++#include <glib.h>
+ #include <graphite/GrClient.h>
+ #include <graphite/GrDebug.h>
+ #include <graphite/ITextSource.h>
+@@ -68,7 +69,6 @@
+ //:>********************************************************************************************
+ //:> Methods: new interface
+ //:>********************************************************************************************
+-#include <glib.h>
+ /*----------------------------------------------------------------------------------------------
+ Get the specified range of text
+ ----------------------------------------------------------------------------------------------*/