From f34f4e076f38ab9fcdcbb85acba290ba9f9a0b52 Mon Sep 17 00:00:00 2001 From: Tomasz Pala Date: Sat, 13 Aug 2011 23:09:21 +0000 Subject: [PATCH 1/1] - initial PLD release with %desc and patches from OpenSuSE and desktop file based on xmbdfed Changed files: gbdfed-1.6_64bit.patch -> 1.1 gbdfed-1.6_array-index.patch -> 1.1 gbdfed.desktop -> 1.1 gbdfed.spec -> 1.1 --- gbdfed-1.6_64bit.patch | 157 +++++++++++++++++++++++++++++++++++ gbdfed-1.6_array-index.patch | 11 +++ gbdfed.desktop | 10 +++ gbdfed.spec | 61 ++++++++++++++ 4 files changed, 239 insertions(+) create mode 100644 gbdfed-1.6_64bit.patch create mode 100644 gbdfed-1.6_array-index.patch create mode 100644 gbdfed.desktop create mode 100644 gbdfed.spec diff --git a/gbdfed-1.6_64bit.patch b/gbdfed-1.6_64bit.patch new file mode 100644 index 0000000..b93c5eb --- /dev/null +++ b/gbdfed-1.6_64bit.patch @@ -0,0 +1,157 @@ +--- bdf.c ++++ bdf.c +@@ -1092,7 +1092,7 @@ + static void + _bdf_add_property(bdf_font_t *font, char *name, char *value) + { +- unsigned int propid; ++ unsigned long propid; + hashnode hn; + int len; + bdf_property_t *prop, *fp; +@@ -1105,7 +1105,7 @@ + * The property already exists in the font, so simply replace + * the value of the property with the current value. + */ +- fp = font->props + (unsigned int) hn->data; ++ fp = font->props + (unsigned long) hn->data; + + switch (fp->format) { + case BDF_ATOM: +@@ -1159,7 +1159,7 @@ + font->props_size++; + } + +- propid = (unsigned int) hn->data; ++ propid = (unsigned long) hn->data; + if (propid >= _num_bdf_properties) + prop = user_props + (propid - _num_bdf_properties); + else +@@ -1199,7 +1199,7 @@ + /* + * Add the property to the font property table. + */ +- hash_insert(fp->name, (void *) font->props_used, ++ hash_insert(fp->name, (void *) ((unsigned long) font->props_used), + (hashtable *) font->internal); + + font->props_used++; +@@ -1883,7 +1883,7 @@ + void + bdf_setup(void) + { +- unsigned int i; ++ unsigned long i; + bdf_property_t *prop; + + hash_init(&proptbl); +@@ -3206,7 +3206,7 @@ + void + bdf_create_property(char *name, int format) + { +- unsigned int n; ++ unsigned long n; + bdf_property_t *p; + + /* +@@ -3243,7 +3243,7 @@ + bdf_get_property(char *name) + { + hashnode hn; +- unsigned int propid; ++ unsigned long propid; + + if (name == 0 || *name == 0) + return 0; +@@ -3251,7 +3251,7 @@ + if ((hn = hash_lookup(name, &proptbl)) == 0) + return 0; + +- propid = (unsigned int) hn->data; ++ propid = (unsigned long) hn->data; + if (propid >= _num_bdf_properties) + return user_props + (propid - _num_bdf_properties); + return _bdf_properties + propid; +@@ -3333,7 +3333,7 @@ + bdf_add_font_property(bdf_font_t *font, bdf_property_t *property) + { + int len; +- unsigned int propid; ++ unsigned long propid; + hashnode hn; + bdf_property_t *p, *ip; + +@@ -3360,7 +3360,7 @@ + * If the property exists and is a user defined property, make sure + * its format is updated to match the property being added. + */ +- propid = (unsigned int) hn->data; ++ propid = (unsigned long) hn->data; + if (propid >= _num_bdf_properties) { + p = user_props + (propid - _num_bdf_properties); + if (p->format != property->format) +@@ -3376,7 +3376,7 @@ + /* + * Changing an existing property value. + */ +- p = font->props + ((unsigned int) hn->data); ++ p = font->props + ((unsigned long) hn->data); + + /* + * If the format changed, then free the atom value if the original +@@ -3433,7 +3433,7 @@ + * name of the property. + */ + hn = hash_lookup(property->name, &proptbl); +- propid = (unsigned int) hn->data; ++ propid = (unsigned long) hn->data; + if (propid >= _num_bdf_properties) + ip = user_props + (propid - _num_bdf_properties); + else +@@ -3480,7 +3480,7 @@ + /* + * Now insert it into the internal hash table. + */ +- hash_insert(p->name, (void *) font->props_used, ++ hash_insert(p->name, (void *) ((unsigned long) font->props_used), + (hashtable *) font->internal); + font->props_used++; + } +@@ -3552,7 +3552,7 @@ + bdf_delete_font_property(bdf_font_t *font, char *name) + { + hashnode hn; +- unsigned int off; ++ unsigned long off; + bdf_property_t *p; + + if (font == 0 || name == 0 || *name == 0 || font->props_used == 0) +@@ -3561,7 +3561,7 @@ + if ((hn = hash_lookup(name, (hashtable *) font->internal)) == 0) + return; + +- off = (unsigned int) hn->data; ++ off = (unsigned long) hn->data; + p = font->props + off; + + /* +@@ -3616,7 +3616,7 @@ + return 0; + + hn = hash_lookup(name, (hashtable *) font->internal); +- return (hn) ? (font->props + ((unsigned int) hn->data)) : 0; ++ return (hn) ? (font->props + ((unsigned long) hn->data)) : 0; + } + + typedef struct { +--- guifile.c ++++ guifile.c +@@ -1858,7 +1858,7 @@ + /* + * Now set up a file name. + */ +- sprintf(buffer1, "%.*s.bdf", dot - file, file); ++ sprintf(buffer1, "%.*s.bdf", (int) (dot - file), file); + + /* + * Delete the file and path names so they can be updated. diff --git a/gbdfed-1.6_array-index.patch b/gbdfed-1.6_array-index.patch new file mode 100644 index 0000000..99d363b --- /dev/null +++ b/gbdfed-1.6_array-index.patch @@ -0,0 +1,11 @@ +--- bdfpsf.c ++++ bdfpsf.c +@@ -105,7 +105,7 @@ + { + int i, more, c0, c1, cnt; + unsigned int code; +- unsigned char buf[4]; ++ unsigned char buf[6]; + bdf_glyph_t *gp; + + gp = font->glyphs; diff --git a/gbdfed.desktop b/gbdfed.desktop new file mode 100644 index 0000000..72fd910 --- /dev/null +++ b/gbdfed.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=gbdfed +Comment=GTK+2-based BDF, Linux console (PSF, CP, and FNT) font editor +Comment[pl]=Edytor fontów BDF i konsoli Linuksa (PSF, CP, i FNT) +Icon=gbdfed +Exec=gbdfed +Terminal=false +Type=Application +Categories=GTK;Development; +# vi: encoding=utf-8 diff --git a/gbdfed.spec b/gbdfed.spec new file mode 100644 index 0000000..03f2c9a --- /dev/null +++ b/gbdfed.spec @@ -0,0 +1,61 @@ +Summary: Bitmap Font Editor +Name: gbdfed +Version: 1.6 +Release: 1 +License: BSD 3-Clause +Group: X11/Applications +Source0: http://sofia.nmsu.edu/~mleisher/Software/gbdfed/%{name}-%{version}.tar.bz2 +# Source0-md5: 2a2e1cbfe8566db6d302f0b9ab79b8dd +Source1: http://sofia.nmsu.edu/~mleisher/Software/gbdfed/gbdfed16x16.png +# Source1-md5: 28625f0878e83687b4c3a293467fc926 +Source2: http://sofia.nmsu.edu/~mleisher/Software/gbdfed/gbdfed32x32.png +# Source2-md5: da88f074603ef8dc621b05bfda5e09f9 +Source3: http://sofia.nmsu.edu/~mleisher/Software/gbdfed/gbdfed48x48.png +# Source3-md5: 3681abf22f23a62c48acfca417655dd0 +Source4: %{name}.desktop +Patch0: %{name}-1.6_64bit.patch +Patch1: %{name}-1.6_array-index.patch +URL: http://sofia.nmsu.edu/~mleisher/Software/gbdfed/ +BuildRequires: freetype-devel +BuildRequires: gtk+2-devel >= 2.6 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +A Gtk-based bitmap font (BDF) editor, descendant of XmBDFed. It can +import PK/GF fonts, HBF fonts (Han Bitmap Font),Linux console fonts +(PSF, CP, FNT), Sun console fonts (vfont), Windows FON/FNT fonts, +TrueType fonts and collections, and X server fonts. It exports PSF +and HEX fonts and allows you to edit two- and four-bits-per-pixel +grayscale fonts. + +%prep +%setup -q +%patch0 -p0 +%patch1 -p0 + +%build +%configure +%{__make} \ + DEFINES="-DHAVE_FREETYPE -DHAVE_HBF -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED" + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT{%{_bindir},%{_desktopdir},%{_iconsdir}/hicolor/{16x16,32x32,48x48}/apps,%{_mandir}/man1} + +install %{name} $RPM_BUILD_ROOT%{_bindir} +install -p %{name}.man $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 +install -p %{SOURCE1} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/16x16/apps/%{name}.png +install -p %{SOURCE2} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/apps/%{name}.png +install -p %{SOURCE3} $RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/%{name}.png +install -p %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc NEWS README +%attr(755,root,root) %{_bindir}/%{name} +%{_desktopdir}/%{name}.desktop +%{_iconsdir}/hicolor/*x*/apps/%{name}.png +%{_mandir}/man1/%{name}.1* -- 2.43.0