diff options
-rw-r--r-- | science/gchemutils/Makefile | 11 | ||||
-rw-r--r-- | science/gchemutils/files/patch-libs_gccv_text.cc | 26 |
2 files changed, 31 insertions, 6 deletions
diff --git a/science/gchemutils/Makefile b/science/gchemutils/Makefile index 6e0e39a339b7..23bd2426f825 100644 --- a/science/gchemutils/Makefile +++ b/science/gchemutils/Makefile @@ -10,6 +10,9 @@ DISTNAME= gnome-chemistry-utils-${PORTVERSION} MAINTAINER= kwm@FreeBSD.org COMMENT= C++ classes and Gtk3 widgets related to chemistry +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/COPYING + BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/bodr.pc:science/bodr \ ${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data LIB_DEPENDS= libgtkglext-x11-1.0.so:x11-toolkits/gtkglext \ @@ -20,16 +23,12 @@ RUN_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/bodr.pc:science/bodr \ PORTSCOUT= limitw:1,even -BROKEN_aarch64= Fails to compile: error: call to abs is ambiguous - USE_XORG= x11 USE_GNOME= gnomedocutils gtk30 intlhack libgsf libxml2 -USES= desktop-file-utils gettext gmake libtool:keepla pathfix \ - pkgconfig shared-mime-info tar:xz +USES= desktop-file-utils gettext gmake libtool:keepla localbase:ldflags \ + pathfix pkgconfig shared-mime-info tar:xz USE_LDCONFIG= yes GNU_CONFIGURE= yes -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS= --with-omf-dir=${PREFIX}/share/omf INSTALLS_ICONS= yes INSTALLS_OMF= yes diff --git a/science/gchemutils/files/patch-libs_gccv_text.cc b/science/gchemutils/files/patch-libs_gccv_text.cc new file mode 100644 index 000000000000..2f282f640f1f --- /dev/null +++ b/science/gchemutils/files/patch-libs_gccv_text.cc @@ -0,0 +1,26 @@ +--- libs/gccv/text.cc 2016/03/26 17:11:08 2017 ++++ libs/gccv/text.cc 2016/10/31 07:44:34 2055 +@@ -1213,7 +1213,10 @@ + case GDK_KEY_Delete: + case GDK_KEY_KP_Delete: { + if (m_CurPos != m_StartSel) { +- ReplaceText (empty_st, MIN (m_CurPos, m_StartSel), abs (m_CurPos - m_StartSel)); ++ if (m_CurPos > m_StartSel) ++ ReplaceText (empty_st, m_StartSel, m_CurPos - m_StartSel); ++ else ++ ReplaceText (empty_st, m_CurPos, m_StartSel - m_CurPos); + if (client) + client->TextChanged (m_CurPos); + break; +@@ -1233,7 +1236,10 @@ + break; + case GDK_KEY_BackSpace: { + if (m_CurPos != m_StartSel) { +- ReplaceText (empty_st, MIN (m_CurPos, m_StartSel), abs (m_CurPos - m_StartSel)); ++ if (m_CurPos > m_StartSel) ++ ReplaceText (empty_st, m_StartSel, m_CurPos - m_StartSel); ++ else ++ ReplaceText (empty_st, m_CurPos, m_StartSel - m_CurPos); + if (client) + client->TextChanged (m_CurPos); + break; |