[packages/chemtool] - drop KDE3 support (mimelnk/application/*.desktop) - use desktop file from the package - fix buildi

baggins baggins at pld-linux.org
Sat Aug 1 11:20:23 CEST 2020


commit 52c982ac9fadab0bc86c2c879717180cbf07567d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Aug 1 11:19:30 2020 +0200

    - drop KDE3 support (mimelnk/application/*.desktop)
    - use desktop file from the package
    - fix building with gcc 10.x
    - general cleanups
    - rel 3

 chemtool.desktop | 15 ---------------
 chemtool.spec    | 14 ++++++--------
 gcc10.patch      | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 42 insertions(+), 23 deletions(-)
---
diff --git a/chemtool.spec b/chemtool.spec
index dea969a..93d471b 100644
--- a/chemtool.spec
+++ b/chemtool.spec
@@ -6,12 +6,12 @@ Summary:	Chemtool - program for 2D drawing organic molecules
 Summary(pl.UTF-8):	Chemtool - program do rysowania 2-wymiarowych cząsteczek organicznych
 Name:		chemtool
 Version:	1.6.14
-Release:	2
+Release:	3
 License:	GPL
 Group:		X11/Applications/Science
 Source0:	http://ruby.chemie.uni-freiburg.de/~martin/chemtool/%{name}-%{version}.tar.gz
 # Source0-md5:	3a97680f0abe1327af1f0072551a68e2
-Source1:	%{name}.desktop
+Patch0:		gcc10.patch
 URL:		http://ruby.chemie.uni-freiburg.de/~martin/chemtool/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	gettext-tools >= 0.14.1
@@ -33,6 +33,7 @@ bibliotek GTK+.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__autoconf}
@@ -42,16 +43,14 @@ bibliotek GTK+.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_datadir}/{mimelnk/application,mime-info,mime-types} \
-	$RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_iconsdir}/hicolor/32x32/mimetypes}
+install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_iconsdir}/hicolor/32x32/mimetypes}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install kde/mimelnk/application/x-chemtool.desktop	$RPM_BUILD_ROOT%{_datadir}/mimelnk/application
-install kde/icons/hicolor/32x32/mimetypes/chemtool.png	$RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/mimetypes
-install %{SOURCE1}				$RPM_BUILD_ROOT%{_desktopdir}
+install %{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}
 install gnome/gnome-application-chemtool.png %{name}.xpm $RPM_BUILD_ROOT%{_pixmapsdir}
+install kde/icons/hicolor/32x32/mimetypes/chemtool.png	$RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/mimetypes
 
 %{__mv} $RPM_BUILD_ROOT%{_localedir}/pt{_PT,}
 
@@ -66,7 +65,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/chemtool
 %attr(755,root,root) %{_bindir}/chemtoolbg
 %attr(755,root,root) %{_bindir}/cht
-%{_datadir}/mimelnk/application/x-chemtool.desktop
 %{_iconsdir}/hicolor/32x32/mimetypes/chemtool.png
 %{_pixmapsdir}/gnome-application-chemtool.png
 %{_pixmapsdir}/chemtool.xpm
diff --git a/chemtool.desktop b/chemtool.desktop
deleted file mode 100644
index 2fcea29..0000000
--- a/chemtool.desktop
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Name=Chemtool
-Comment=Molecules 2D drawing program
-Comment[cs]=Editor molekul
-Comment[de]=Moleküleditor
-Comment[pl]=Edytor molekuł
-Exec=chemtool
-Icon=chemtool
-Terminal=false
-MultipleArgs=false
-Type=Application
-MimeType=application/x-chemtool;
-InitialPreference=2
-Categories=Education;Science;Chemistry;
-# vi: encoding=utf-8
diff --git a/gcc10.patch b/gcc10.patch
new file mode 100644
index 0000000..ab696a9
--- /dev/null
+++ b/gcc10.patch
@@ -0,0 +1,36 @@
+--- chemtool-1.6.14/ct1.h~	2011-12-23 20:30:53.000000000 +0100
++++ chemtool-1.6.14/ct1.h	2020-08-01 11:10:05.058441414 +0200
+@@ -273,12 +273,12 @@
+ extern float importfactor;
+ extern int importoffset;
+ 
+-char **intype;
+-char **inmode;
+-int babelin;
+-char **outtype;
+-char **outmode;
+-int babelout;
++extern char **intype;
++extern char **inmode;
++extern int babelin;
++extern char **outtype;
++extern char **outmode;
++extern int babelout;
+ extern char *babel;
+ extern GdkGC *mygc[8],*background_gc,*hlgc;
+ extern int curpen;
+--- chemtool-1.6.14/inout.c~	2013-08-13 01:39:43.000000000 +0200
++++ chemtool-1.6.14/inout.c	2020-08-01 11:13:24.128787466 +0200
+@@ -30,6 +30,12 @@
+ extern GdkFont *font[7],*smallfont[7],*symbfont[7],*boldfont[7],*slfont[7];
+ #endif
+ 
++char **intype;
++char **inmode;
++int babelin;
++char **outtype;
++char **outmode;
++int babelout;
+ static char babeloutp[4];
+ 
+ int
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/chemtool.git/commitdiff/52c982ac9fadab0bc86c2c879717180cbf07567d



More information about the pld-cvs-commit mailing list