SHA256
1
0
forked from pool/gbdfed

Accepting request 71757 from openSUSE:Factory:Contrib

please review, contrib cleanup

OBS-URL: https://build.opensuse.org/request/show/71757
OBS-URL: https://build.opensuse.org/package/show/M17N/gbdfed?expand=0&rev=1
This commit is contained in:
Stephan Kulow 2011-05-27 16:33:54 +00:00 committed by Git OBS Bridge
commit 16eb6f60f0
12 changed files with 414 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

50
COPYING Normal file
View File

@ -0,0 +1,50 @@
Copyright 2006 Computing Research Labs, New Mexico State University
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
hbf.c, hbf.h:
Copyright 1993,1994,1995,2005 by Ross Paterson
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

3
gbdfed-1.6.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5db25d4ce688dcb188dee056e58614a94a5e4fce4b6066fbb310951ab999093c
size 236166

161
gbdfed-1.6_64bit.patch Normal file
View File

@ -0,0 +1,161 @@
Index: bdf.c
===================================================================
--- bdf.c.orig
+++ bdf.c
@@ -1084,7 +1084,7 @@ _bdf_is_atom(char *line, unsigned int li
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;
@@ -1097,7 +1097,7 @@ _bdf_add_property(bdf_font_t *font, char
* 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:
@@ -1151,7 +1151,7 @@ _bdf_add_property(bdf_font_t *font, char
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
@@ -1191,7 +1191,7 @@ _bdf_add_property(bdf_font_t *font, char
/*
* 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++;
@@ -1876,7 +1876,7 @@ _bdf_parse_start(char *line, unsigned in
void
bdf_setup(void)
{
- unsigned int i;
+ unsigned long i;
bdf_property_t *prop;
hash_init(&proptbl);
@@ -3199,7 +3199,7 @@ bdf_free_font(bdf_font_t *font)
void
bdf_create_property(char *name, int format)
{
- unsigned int n;
+ unsigned long n;
bdf_property_t *p;
/*
@@ -3236,7 +3236,7 @@ bdf_property_t *
bdf_get_property(char *name)
{
hashnode hn;
- unsigned int propid;
+ unsigned long propid;
if (name == 0 || *name == 0)
return 0;
@@ -3244,7 +3244,7 @@ bdf_get_property(char *name)
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;
@@ -3326,7 +3326,7 @@ void
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;
@@ -3353,7 +3353,7 @@ bdf_add_font_property(bdf_font_t *font,
* 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)
@@ -3369,7 +3369,7 @@ bdf_add_font_property(bdf_font_t *font,
/*
* 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
@@ -3426,7 +3426,7 @@ bdf_add_font_property(bdf_font_t *font,
* 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
@@ -3473,7 +3473,7 @@ bdf_add_font_property(bdf_font_t *font,
/*
* 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++;
}
@@ -3545,7 +3545,7 @@ void
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)
@@ -3554,7 +3554,7 @@ bdf_delete_font_property(bdf_font_t *fon
if ((hn = hash_lookup(name, (hashtable *) font->internal)) == 0)
return;
- off = (unsigned int) hn->data;
+ off = (unsigned long) hn->data;
p = font->props + off;
/*
@@ -3609,7 +3609,7 @@ bdf_get_font_property(bdf_font_t *font,
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 {
Index: guifile.c
===================================================================
--- guifile.c.orig
+++ guifile.c
@@ -1883,7 +1883,7 @@ load_otf_font(gbdfed_editor_t *ed, gchar
/*
* 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.

View File

@ -0,0 +1,13 @@
Index: bdfpsf.c
===================================================================
--- bdfpsf.c.orig
+++ bdfpsf.c
@@ -98,7 +98,7 @@ _bdf_psf_load_map(FILE *in, bdf_font_t *
{
int i, more, c0, c1, cnt;
unsigned int code;
- unsigned char buf[4];
+ unsigned char buf[6];
bdf_glyph_t *gp;
gp = font->glyphs;

76
gbdfed.changes Normal file
View File

@ -0,0 +1,76 @@
-------------------------------------------------------------------
Tue Apr 20 16:14:58 CEST 2010 - pgajdos@suse.cz
- updated to 1.6
- removed upstreamed getline.patch
-------------------------------------------------------------------
Thu Nov 19 15:02:37 CET 2009 - pgajdos@suse.cz
- removed upstreamed deprec-gtkfileselection.patch
-------------------------------------------------------------------
Wed Jun 3 16:03:45 CEST 2009 - pgajdos@suse.cz
- getline() renamed to get_line(), because getline() is provided by
glibc
-------------------------------------------------------------------
Mon Mar 9 11:04:49 CET 2009 - pgajdos@suse.cz
- updated to 1.5 (see NEWS)
-------------------------------------------------------------------
Tue Jun 24 17:00:13 CEST 2008 - pgajdos@suse.cz
- updated to 1.4:
* Changed last instance of FileSelection to FileChooser.
* Updated to work with GTK 2.12 (GtkTooltip).
* Fixed a problem when X11 is not available and bdfgrab.c won't compile as a
result.
* Remove the _XMBDFED_INFO font property when fonts are loaded or grabbed
from the X server.
* Fixed a problem with renaming glyphs using the Adobe Glyph Name List.
* Fixed a warning about checking for a point in a NULL region.
* Fixed a crash that happened because some file filter objects were being
dereferenced when the import dialog was popped up multiple times.
* Added up to 10 recent fonts to the File menu.
* Changed the keyboard activate key for Exit from 'e' to 'x' and the
activate key for Export from 'x' to 'p'.
* Fixed a problem with fonts grabbed from the X server always being loaded
into the FontGrid that popped up the dialog.
* Fixed a couple problems with integer sign promotion affecting import of
OTF fonts.
-------------------------------------------------------------------
Fri Jul 20 21:15:06 CEST 2007 - pgajdos@suse.cz
- fixed some 64bit problems by upstream
* 64bit.patch
- compiling with new gtk2
* deprec-gtkfileselection.patch
-------------------------------------------------------------------
Mon Jun 25 09:52:51 CEST 2007 - pgajdos@suse.cz
- fixed new gcc error: array index out of range
* array-index.patch
-------------------------------------------------------------------
Thu Apr 26 11:40:33 CEST 2007 - pgajdos@suse.cz
- adding Encoding entry to desktop file to avoid
lint error
-------------------------------------------------------------------
Mon Apr 16 16:20:27 CEST 2007 - pgajdos@suse.cz
- updated to version 1.3:
* 64-bit fixes
* fixed installation in DESTDIR
-------------------------------------------------------------------
Tue Apr 10 17:00:35 CEST 2007 - pgajdos@suse.cz
- package created, version 1.2

7
gbdfed.desktop Normal file
View File

@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Exec=gbdfed
Name=gbdfed
GenericName=Bitmap Font Editor
Icon=gbdfed

71
gbdfed.spec Normal file
View File

@ -0,0 +1,71 @@
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: gbdfed
Version: 1.6
Release: 1
License: BSD 3-Clause
Summary: A Gtk-based BDF Font Editor, Descendant of XmBDFed
Url: http://www.math.nmsu.edu/~mleisher/Software/gbdfed/
Group: Productivity/Graphics/Bitmap Editors
Source: %{name}-%{version}.tar.bz2
Source1: gbdfed.desktop
Source2: COPYING
Source3: gbdfed16x16.png
Source4: gbdfed32x32.png
Source5: gbdfed48x48.png
Patch0: %{name}-%{version}_array-index.patch
Patch1: %{name}-%{version}_64bit.patch
BuildRequires: freetype2-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(gtk+-2.0)
Provides: xmbdfed
Obsoletes: xmbdfed
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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
install -m 644 %{SOURCE2} .
%patch0
%patch1
%build
%configure
make %{?smp_mflags}
%install
%make_install
# desktop menu
%suse_update_desktop_file -i %{name} Graphics RasterGraphics
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,48x48}/apps
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/gbdfed.png
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/gbdfed.png
install -m 644 %{SOURCE5} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/gbdfed.png
mkdir -p %{buildroot}%{_datadir}/pixmaps
ln -sf ../icons/hicolor/48x48/apps/gbdfed.png %{buildroot}%{_datadir}/pixmaps/gbdfed.png
# compat stuff with obsoleted xmbdfed
ln -sf gbdfed %{buildroot}%{_bindir}/xmbdfed
echo ".so man1/gbdfed.1" >%{buildroot}%{_mandir}/man1/xmbdfed.1
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_datadir}/applications/gbdfed.desktop
%{_bindir}/*
%{_datadir}/icons/*
%{_datadir}/pixmaps/gbdfed.png
%doc NEWS README COPYING
%doc %{_mandir}/man1/*
%changelog

3
gbdfed16x16.png Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5bcc113fdad9ea8e2c6e15806ca6556adc6761f54474b0fb08aabfe90d06c344
size 266

3
gbdfed32x32.png Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de2edb9c7e29e208c077bf48069deebb70d639cb419de52a1093f84e1c7b6397
size 275

3
gbdfed48x48.png Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c54f2141b868f617e6c5935266161616e0d7756e299fb58d1e5d1e4bbbac3f08
size 292