upload tizen1.0 source
authorKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 08:06:26 +0000 (17:06 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 08:06:26 +0000 (17:06 +0900)
packaging/10_scan-module-files-in-dirs.patch [new file with mode: 0644]
packaging/11_module-files-append-module-files-d.patch [new file with mode: 0644]
packaging/12_module-files-append-compat-module-files-d.patch [new file with mode: 0644]
packaging/pango.spec

diff --git a/packaging/10_scan-module-files-in-dirs.patch b/packaging/10_scan-module-files-in-dirs.patch
new file mode 100644 (file)
index 0000000..24dc73b
--- /dev/null
@@ -0,0 +1,55 @@
+Index: pango1.0-1.16.0/pango/modules.c
+===================================================================
+--- pango1.0-1.16.0.orig/pango/modules.c       2007-01-23 00:41:43.000000000 +0100
++++ pango1.0-1.16.0/pango/modules.c    2007-03-07 11:16:16.000000000 +0100
+@@ -40,6 +40,9 @@
+ #define PANGO_MODULE(module) (G_TYPE_CHECK_INSTANCE_CAST ((module), PANGO_TYPE_MODULE, PangoModule))
+ #define PANGO_IS_MODULE(module)  (G_TYPE_CHECK_INSTANCE_TYPE ((module), PANGO_TYPE_MODULE))
++#define MODULEFILEEXT ".modules"
++#define MODULEFILEEXT_LEN ((int) strlen (MODULEFILEEXT))
++
+ typedef struct _PangoMapInfo PangoMapInfo;
+ typedef struct _PangoEnginePair PangoEnginePair;
+ typedef struct _PangoSubmap PangoSubmap;
+@@ -519,11 +522,36 @@
+   while (n-- > 0)
+     {
+-      module_file = g_fopen (files[n], "r");
+-      if (module_file)
++      GDir *dir = g_dir_open (files[n], 0, NULL);
++      if (dir)
+       {
+-        process_module_file(module_file);
+-        fclose(module_file);
++        const char *dent;
++
++        while ((dent = g_dir_read_name (dir)))
++          {
++            int len = strlen (dent);
++            if (len > MODULEFILEEXT_LEN && strcmp (dent + len - MODULEFILEEXT_LEN, MODULEFILEEXT) == 0)
++              {
++                gchar *pathname = g_build_filename (files[n], dent, NULL);
++                module_file = g_fopen (pathname, "r");
++                if (module_file)
++                  {
++                    process_module_file(module_file);
++                    fclose(module_file);
++                  }
++                g_free (pathname);
++              }
++          }
++        g_dir_close (dir);
++      }
++      else
++      {
++        module_file = g_fopen (files[n], "r");
++        if (module_file)
++          {
++            process_module_file(module_file);
++            fclose(module_file);
++          }
+       }
+     }
diff --git a/packaging/11_module-files-append-module-files-d.patch b/packaging/11_module-files-append-module-files-d.patch
new file mode 100644 (file)
index 0000000..a4cad02
--- /dev/null
@@ -0,0 +1,39 @@
+Index: pango1.0-1.16.0/pango/modules.c
+===================================================================
+--- pango1.0-1.16.0.orig/pango/modules.c       2007-03-07 11:16:16.000000000 +0100
++++ pango1.0-1.16.0/pango/modules.c    2007-03-07 11:16:26.000000000 +0100
+@@ -504,6 +504,11 @@
+   FILE *module_file;
+   char *file_str =  pango_config_key_get ("Pango/ModuleFiles");
++  char *module_files_d_str = g_build_filename (pango_get_lib_subdirectory (),
++                                             MODULE_VERSION,
++                                             "module-files.d",
++                                             NULL);
++  char *list_str;
+   char **files;
+   int n;
+@@ -514,7 +519,12 @@
+                                "pango.modules",
+                                NULL);
+-  files = pango_split_file_list (file_str);
++  list_str = g_strjoin (G_SEARCHPATH_SEPARATOR_S,
++                      file_str,
++                      module_files_d_str,
++                      NULL);
++
++  files = pango_split_file_list (list_str);
+   n = 0;
+   while (files[n])
+@@ -556,6 +566,8 @@
+     }
+   g_strfreev (files);
++  g_free (list_str);
++  g_free (module_files_d_str);
+   g_free (file_str);
+   dlloaded_engines = g_slist_reverse (dlloaded_engines);
diff --git a/packaging/12_module-files-append-compat-module-files-d.patch b/packaging/12_module-files-append-compat-module-files-d.patch
new file mode 100644 (file)
index 0000000..a169607
--- /dev/null
@@ -0,0 +1,59 @@
+Index: pango1.0-1.16.0/pango/modules.c
+===================================================================
+--- pango1.0-1.16.0.orig/pango/modules.c       2007-03-07 11:16:26.000000000 +0100
++++ pango1.0-1.16.0/pango/modules.c    2007-03-07 11:16:33.000000000 +0100
+@@ -24,6 +24,7 @@
+ #include <string.h>
+ #include <limits.h>
+ #include <errno.h>
++#include <unistd.h>
+ #include <gmodule.h>
+ #include <glib/gstdio.h>
+@@ -508,6 +509,18 @@
+                                              MODULE_VERSION,
+                                              "module-files.d",
+                                              NULL);
++
++#if defined(__linux__) && defined (__i386__)
++  char *compat_module_files_d_str = g_build_filename ("/usr/lib32/pango",
++                                             MODULE_VERSION,
++                                             "module-files.d",
++                                             NULL);
++#elif defined(__linux__) && ( defined (__x86_64__) || defined(__ia64__) )
++  char *compat_module_files_d_str = g_build_filename ("/usr/lib64/pango",
++                                             MODULE_VERSION,
++                                             "module-files.d",
++                                             NULL);
++#endif
+   char *list_str;
+   char **files;
+   int n;
+@@ -519,6 +532,17 @@
+                                "pango.modules",
+                                NULL);
++#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
++  /* prefer compat_module_files_d_str over module_files_d_str on the above
++   * arches if it's usable */
++  if (! g_access(compat_module_files_d_str, R_OK|X_OK))
++      list_str = g_strjoin (G_SEARCHPATH_SEPARATOR_S,
++                          file_str,
++                          compat_module_files_d_str,
++                          NULL);
++  else /* continued below */
++#endif
++
+   list_str = g_strjoin (G_SEARCHPATH_SEPARATOR_S,
+                       file_str,
+                       module_files_d_str,
+@@ -568,6 +592,9 @@
+   g_strfreev (files);
+   g_free (list_str);
+   g_free (module_files_d_str);
++#if defined(__linux__) && ( defined(__i386__) || defined (__x86_64__) || defined(__ia64__) )
++  g_free (compat_module_files_d_str);
++#endif
+   g_free (file_str);
+   dlloaded_engines = g_slist_reverse (dlloaded_engines);
index 843cdde..90e45ee 100644 (file)
@@ -5,7 +5,7 @@
 Name:       pango
 Summary:    System for layout and rendering of internationalized text
 Version:    1.26.1
-Release:    1
+Release:    3.2
 Group:      System/GUI/GNOME
 License:    LGPLv2+
 URL:        http://www.pango.org
@@ -13,9 +13,6 @@ Source0:    http://download.gnome.org/sources/pango/1.26/pango-%{version}.tar.gz
 Patch0: 10_scan-module-files-in-dirs.patch
 Patch1: 11_module-files-append-module-files-d.patch
 Patch2: 12_module-files-append-compat-module-files-d.patch
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-Requires(post): /usr/bin/pango-querymodules
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(freetype2) >= %{freetype_version}
 BuildRequires:  pkgconfig(fontconfig) >= %{fontconfig_version}
@@ -38,35 +35,19 @@ with different font backends.
 The integration of Pango with Cairo provides a complete solution with high
 quality text handling and graphics rendering.
 
-
-%package -n libpango
-Summary:    Pango Library
-Group:      System/Libraries
-
-%description -n libpango
-Pango is a library for laying out and rendering of text, with an emphasis
-on internationalization. Pango can be used anywhere that text layout is needed,
-though most of the work on Pango so far has been done in the context of the
-GTK+ widget toolkit. Pango forms the core of text and font handling for GTK+.
-
-Pango is designed to be modular; the core Pango layout engine can be used
-with different font backends.
-
-The integration of Pango with Cairo provides a complete solution with high
-quality text handling and graphics rendering.
-
-
-%package -n libpango-devel
+%package    devel
 Summary:    Development files for pango
 Group:      Development/Libraries
-Requires:   lib%{name} = %{version}-%{release}
+Requires:   %{name} = %{version}-%{release}
 
-%description -n libpango-devel
+%description devel
 The pango-devel package includes the header files and developer documentation
 for the pango package.
 
+%define MODVER 1.6.0
+
 %prep
-%setup -q 
+%setup -q
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -91,32 +72,24 @@ rm -rf %{buildroot}
 rm -rf $RPM_BUILD_ROOT/usr/share/gtk-doc
 rm -rf $RPM_BUILD_ROOT/usr/share/man
 
-touch $RPM_BUILD_ROOT%{_sysconfdir}/pango/pango.modules
-mkdir -p %{buildroot}/etc/pango
-
+mkdir -p %{buildroot}%{_libdir}/pango/%{MODVER}/module-files.d
+touch $RPM_BUILD_ROOT%{_libdir}/pango/%{MODVER}/module-files.d/%{name}.modules
 
+%post
+/sbin/ldconfig
+%{_bindir}/pango-querymodules > %{_libdir}/pango/%{MODVER}/module-files.d/%{name}.modules
 
-%post -n libpango -p /sbin/ldconfig
-%{_bindir}/pango-querymodules > %{_sysconfdir}/pango/pango.modules
-
-%postun -n libpango -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
 
 %files
-%{_bindir}/pango-querymodules
-%{_bindir}/pango-view
-%dir %{_sysconfdir}/pango
-%config %{_sysconfdir}/pango/pangox.aliases
-%ghost %{_sysconfdir}/pango/pango.modules
-
-
-%files -n libpango
 %{_libdir}/libpango*-*.so.*
 %{_libdir}/pango
-%dir /etc/pango
-
+%{_bindir}/pango-querymodules
 
-%files -n libpango-devel
+%files devel
 %{_libdir}/libpango*.so
 %{_includedir}/*
 %{_libdir}/pkgconfig/*.pc
-
+%{_bindir}/pango-view
+%dir %{_sysconfdir}/pango
+%config %{_sysconfdir}/pango/pangox.aliases
\ No newline at end of file