commit:     83f9cf691f491e7e0ed420fefc3e21ebfde921e9
Author:     Fabio Rossi <rossi.f <AT> inwind <DOT> it>
AuthorDate: Mon Feb 17 13:14:20 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 19 17:57:37 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83f9cf69

dev-embedded/gpsim: new revision 0.32.1-r1

- added support to the gui
- improved configure.ac (conftest.c error and missing libs)

Closes: https://bugs.gentoo.org/922300
Closes: https://bugs.gentoo.org/949813
Signed-off-by: Fabio Rossi <rossi.f <AT> inwind.it>
Closes: https://github.com/gentoo/gentoo/pull/40615
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../gpsim/files/gpsim-0.32.1-configure.patch       | 26 ++++++++++
 .../gpsim/files/gpsim-0.32.1-missing-lib-m.patch   | 10 ++++
 dev-embedded/gpsim/gpsim-0.32.1-r1.ebuild          | 56 ++++++++++++++++++++++
 3 files changed, 92 insertions(+)

diff --git a/dev-embedded/gpsim/files/gpsim-0.32.1-configure.patch 
b/dev-embedded/gpsim/files/gpsim-0.32.1-configure.patch
new file mode 100644
index 000000000000..2933e9a109e8
--- /dev/null
+++ b/dev-embedded/gpsim/files/gpsim-0.32.1-configure.patch
@@ -0,0 +1,26 @@
+--- ./configure.ac     2025-02-17 13:54:52.780179636 +0100
++++ ./configure.ac.new 2025-02-17 13:55:02.913179831 +0100
+@@ -169,11 +169,6 @@
+ fi
+ X_LDFLAGS="$X_LDFLAGS -lm"
+ 
+-wi_LIB_READLINE
+-  if test "$wi_cv_lib_readline" != yes; then
+-      AC_MSG_ERROR(Cannot find readline library)
+-  fi
+-
+ # Checks for programs.
+ AC_PROG_CXX
+ AC_PROG_CXXCPP
+@@ -186,6 +181,11 @@
+ AC_PROG_LEX(noyywrap)
+ LT_INIT
+ 
++wi_LIB_READLINE
++  if test "$wi_cv_lib_readline" != yes; then
++      AC_MSG_ERROR(Cannot find readline library)
++  fi
++
+ # Checks for libraries.
+ AC_LANG([C++])
+ #AC_CHECK_LIB([gpsim], [main])

diff --git a/dev-embedded/gpsim/files/gpsim-0.32.1-missing-lib-m.patch 
b/dev-embedded/gpsim/files/gpsim-0.32.1-missing-lib-m.patch
new file mode 100644
index 000000000000..15b3bec932c7
--- /dev/null
+++ b/dev-embedded/gpsim/files/gpsim-0.32.1-missing-lib-m.patch
@@ -0,0 +1,10 @@
+--- ./configure.ac.orig        2025-02-17 13:47:15.764170851 +0100
++++ ./configure.ac     2025-02-17 13:47:52.610171559 +0100
+@@ -167,6 +167,7 @@
+   echo linking with gtk-$GTK_VERSION_T
+   AC_DEFINE_UNQUOTED([GTK_VERSION],"$GTK_VERSION_T",[gtk version])
+ fi
++X_LDFLAGS="$X_LDFLAGS -lm"
+ 
+ wi_LIB_READLINE
+   if test "$wi_cv_lib_readline" != yes; then

diff --git a/dev-embedded/gpsim/gpsim-0.32.1-r1.ebuild 
b/dev-embedded/gpsim/gpsim-0.32.1-r1.ebuild
new file mode 100644
index 000000000000..6561eb998b8e
--- /dev/null
+++ b/dev-embedded/gpsim/gpsim-0.32.1-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A simulator for the Microchip PIC microcontrollers"
+HOMEPAGE="https://gpsim.sourceforge.net";
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
+
+IUSE="doc gui"
+
+RDEPEND="
+       gui? ( x11-libs/gtk+:2 )
+       >=dev-embedded/gputils-0.12
+       dev-libs/glib:2
+       dev-libs/popt
+       sys-libs/readline:0=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+       app-alternatives/lex
+       virtual/pkgconfig
+       app-alternatives/yacc
+"
+DOCS=( ANNOUNCE AUTHORS ChangeLog HISTORY PROCESSORS README README.MODULES \
+       TODO doc/gpsim.pdf )
+HTML_DOCS=( doc/gpsim.html.LyXconv/gpsim.html )
+
+PATCHES=(
+       "${FILESDIR}"/${P}-missing-lib-m.patch
+       "${FILESDIR}"/${P}-configure.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       local myeconfargs=(
+               $(usex gui "" --disable-gui)
+               --disable-static
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_install() {
+       default
+       find "${ED}" -name '*.la' -delete || die
+}

Reply via email to