NetBSD Problem Report #49680

From www@NetBSD.org  Wed Feb 18 23:03:25 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 474F8A654C
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 18 Feb 2015 23:03:25 +0000 (UTC)
Message-Id: <20150218230323.64A8CA6551@mollari.NetBSD.org>
Date: Wed, 18 Feb 2015 23:03:23 +0000 (UTC)
From: youri.mout@gmail.com
Reply-To: youri.mout@gmail.com
To: gnats-bugs@NetBSD.org
Subject: editors/lyx fails to build on Mac OS X (with fix)
X-Send-Pr-Version: www-1.0

>Number:         49680
>Category:       pkg
>Synopsis:       editors/lyx fails to build on Mac OS X (with fix)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    youri
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 18 23:05:00 +0000 2015
>Closed-Date:    Sun Jun 03 02:28:34 +0000 2018
>Last-Modified:  Sun Jun 03 02:30:00 +0000 2018
>Originator:     Youri Mouton
>Release:        current
>Organization:
>Environment:
Darwin mac.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
>Description:
1) Lyx needs a path for the pkgsrc libiconv included as buildlink

2) Mac OS X does not have <ciso646>

3) The PLIST includes a few files the Mac OS X application does not need so the packaging fails and therefore I added a PLIST_VARS.unix for the .desktop and icons files.
>How-To-Repeat:

>Fix:
diff --git a/editors/lyx/Makefile b/editors/lyx/Makefile
index e0c5b754..6594511 100644
--- a/editors/lyx/Makefile
+++ b/editors/lyx/Makefile
@@ -68,6 +68,7 @@ PYTHON_VERSIONS_INCOMPATIBLE=	33 34 # not yet ported as of 1.6.10

 CXXFLAGS.Linux+=	-fpermissive

+CONFIGURE_ARGS+=	--with-libiconv-prefix=${PREFIX}
 CONFIGURE_ARGS+=	--without-included-mythes
 CONFIGURE_ARGS+=	--without-included-boost

@@ -78,6 +79,7 @@ CONFIGURE_ARGS+=	--with-extra-prefix=${BUILDLINK_PREFIX.qt4-libs} \

 .include "../../mk/bsd.prefs.mk"

+PLIST_VARS+=	unix
 .if ${OPSYS} == "Darwin"
 GNU_CONFIGURE_PREFIX=	${PREFIX}/Applications/LyX.app
 PLIST_SUBST+=		BIN_DIR=Applications/LyX.app/Contents/MacOS \
@@ -85,6 +87,7 @@ PLIST_SUBST+=		BIN_DIR=Applications/LyX.app/Contents/MacOS \
 			MAN_DIR=Applications/LyX.app/Contents/Resources/man \
 			SHARE_DIR=Applications/LyX.app/Contents/Resources
 .else
+PLIST.unix=		yes
 PLIST_SUBST+=		BIN_DIR=bin \
 			LYX=lyx \
 			MAN_DIR="${PKGMANDIR}" \
diff --git a/editors/lyx/PLIST b/editors/lyx/PLIST
index 1ef2c05..3d2cf69 100644
--- a/editors/lyx/PLIST
+++ b/editors/lyx/PLIST
@@ -5,9 +5,9 @@ ${BIN_DIR}/tex2lyx
 ${MAN_DIR}/man1/lyx.1
 ${MAN_DIR}/man1/lyxclient.1
 ${MAN_DIR}/man1/tex2lyx.1
-share/applications/lyx.desktop
-share/icons/hicolor/48x48/apps/lyx.png
-share/icons/hicolor/scalable/apps/lyx.svg
+${PLIST.unix}share/applications/lyx.desktop
+${PLIST.unix}share/icons/hicolor/48x48/apps/lyx.png
+${PLIST.unix}share/icons/hicolor/scalable/apps/lyx.svg
 share/locale/ar/LC_MESSAGES/${LYX}.mo
 share/locale/ca/LC_MESSAGES/${LYX}.mo
 share/locale/cs/LC_MESSAGES/${LYX}.mo
diff --git a/editors/lyx/distinfo b/editors/lyx/distinfo
index a0ff29b..ccf9ef8 100644
--- a/editors/lyx/distinfo
+++ b/editors/lyx/distinfo
@@ -3,12 +3,12 @@ $NetBSD: distinfo,v 1.14 2015/01/10 18:13:22 rumko Exp $
 SHA1 (lyx-2.1.2.2.tar.xz) = ae0fc59418d072631257c96165a10f041de71cc2
 RMD160 (lyx-2.1.2.2.tar.xz) = 0f2ee7ac33b2622c1d090220c2d5f33f7025c3b1
 Size (lyx-2.1.2.2.tar.xz) = 10650108 bytes
-SHA1 (patch-config.h.in) = 018c4a4fc20975dabf9473ed0665800d290d3292
+SHA1 (patch-config.h.in) = 825198a808377b674c11db83ecd5ecf3d6cb4daa
 SHA1 (patch-development_MacOSX_Makefile.in) = 086dddfcd7b2ca498e87b0d3e90a211aca2f64fe
-SHA1 (patch-src_WordList.cpp) = d747efcd6ca4d7015a5c6860a8844ac79a65672a
-SHA1 (patch-src_mathed_InsetMath.h) = c178b1436c7a969e29b328dde1a800e9ccb7af0e
-SHA1 (patch-src_mathed_MathData.h) = fcd51f36aa2aae29f75e041d7adb1d88baa370a5
+SHA1 (patch-src_WordList.cpp) = f47f6465dd1806e7ea14a10d342ec53cf231b064
+SHA1 (patch-src_mathed_InsetMath.h) = 7724c2d23e59f744a889adac00c3863a53a6f1d8
+SHA1 (patch-src_mathed_MathData.h) = c1235f887eda2e05aba309aafa3ca593f69c211c
 SHA1 (patch-src_support_debug.h) = b1dfbc87c14db0ad1f4bf44c3460815cac3f17ca
 SHA1 (patch-src_support_os__unix.cpp) = b2d6f598f04e1bab78f270179cd10caddb5bd157
 SHA1 (patch-src_support_strfwd.h) = 39bebff1a10e4509c5499f60bc2028ab5e66a671
-SHA1 (patch-src_support_unicode.cpp) = 71bdc1b929a3c90bed84d6de5aa0734e548c67de
+SHA1 (patch-src_support_unicode.cpp) = cecc8210c703a77cac9dd804c945c346af4e9478
diff --git a/editors/lyx/patches/patch-config.h.in b/editors/lyx/patches/patch-config.h.in
index da37ea7..7248b1d 100644
--- a/editors/lyx/patches/patch-config.h.in
+++ b/editors/lyx/patches/patch-config.h.in
@@ -4,9 +4,11 @@ Fix build under fbsd, do not use tr1 with libc++.

 --- config.h.in.orig	2014-11-15 18:11:36.000000000 +0000
 +++ config.h.in
-@@ -353,7 +353,8 @@ char * strerror(int n);
+@@ -352,11 +352,14 @@ char * strerror(int n);
+ #define BOOST_NO_WSTRING 1

  // TR1 regex not supported in GCC <= 4.5
++#if !defined(__APPLE__)
  #ifndef LYX_USE_TR1
 -#  if __GNUC__ == 4 
 +#  include <ciso646>
@@ -14,3 +16,7 @@ Fix build under fbsd, do not use tr1 with libc++.
  #    define LYX_USE_TR1
  #  endif
  #endif
++#endif
+ 
+ #ifdef __CYGWIN__
+ #  define NOMINMAX
diff --git a/editors/lyx/patches/patch-src_WordList.cpp b/editors/lyx/patches/patch-src_WordList.cpp
index fddd12b..3c67d1f 100644
--- a/editors/lyx/patches/patch-src_WordList.cpp
+++ b/editors/lyx/patches/patch-src_WordList.cpp
@@ -2,7 +2,7 @@ $NetBSD: patch-src_WordList.cpp,v 1.1 2012/03/10 20:55:47 markd Exp $

 Fix build with gcc 4.6

---- src/WordList.cpp.orig	2008-04-30 08:26:40.000000000 +0000
+--- src/WordList.cpp.orig	2014-11-15 18:11:26.000000000 +0000
 +++ src/WordList.cpp
 @@ -9,6 +9,7 @@
   */
diff --git a/editors/lyx/patches/patch-src_mathed_InsetMath.h b/editors/lyx/patches/patch-src_mathed_InsetMath.h
index a562887..cb40c31 100644
--- a/editors/lyx/patches/patch-src_mathed_InsetMath.h
+++ b/editors/lyx/patches/patch-src_mathed_InsetMath.h
@@ -2,7 +2,7 @@ $NetBSD: patch-src_mathed_InsetMath.h,v 1.1 2012/03/10 20:55:47 markd Exp $

 Fix build with gcc 4.6

---- src/mathed/InsetMath.h.orig	2010-12-29 15:36:35.000000000 +0000
+--- src/mathed/InsetMath.h.orig	2014-11-15 18:11:26.000000000 +0000
 +++ src/mathed/InsetMath.h
 @@ -13,6 +13,7 @@
  #ifndef MATH_INSET_H
diff --git a/editors/lyx/patches/patch-src_mathed_MathData.h b/editors/lyx/patches/patch-src_mathed_MathData.h
index 916516a..740007d 100644
--- a/editors/lyx/patches/patch-src_mathed_MathData.h
+++ b/editors/lyx/patches/patch-src_mathed_MathData.h
@@ -2,7 +2,7 @@ $NetBSD: patch-src_mathed_MathData.h,v 1.1 2012/03/10 20:55:47 markd Exp $

 Fix build with gcc 4.6

---- src/mathed/MathData.h.orig	2010-01-20 02:10:29.000000000 +0000
+--- src/mathed/MathData.h.orig	2014-11-15 18:11:26.000000000 +0000
 +++ src/mathed/MathData.h
 @@ -15,6 +15,7 @@
  #ifndef MATH_DATA_H
diff --git a/editors/lyx/patches/patch-src_support_unicode.cpp b/editors/lyx/patches/patch-src_support_unicode.cpp
index c0b6979..a407d62 100644
--- a/editors/lyx/patches/patch-src_support_unicode.cpp
+++ b/editors/lyx/patches/patch-src_support_unicode.cpp
@@ -2,7 +2,7 @@ $NetBSD: patch-src_support_unicode.cpp,v 1.1 2012/03/10 20:55:47 markd Exp $

 Fix build with gcc 4.6

---- src/support/unicode.cpp.orig	2009-05-19 20:30:43.000000000 +0000
+--- src/support/unicode.cpp.orig	2014-11-15 18:11:26.000000000 +0000
 +++ src/support/unicode.cpp
 @@ -11,6 +11,7 @@
   */

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->macosx-pkg-people
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Fri, 20 Feb 2015 12:44:57 +0000
Responsible-Changed-Why:
This is a Mac OS X problem.


Responsible-Changed-From-To: macosx-pkg-people->macos-pkg-people
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Sun, 01 Mar 2015 10:51:27 +0000
Responsible-Changed-Why:
Correct role account name.


Responsible-Changed-From-To: macos-pkg-people->youri
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Tue, 05 Jul 2016 12:32:35 +0000
Responsible-Changed-Why:
Youri, you can now commit this yourself! :)


State-Changed-From-To: open->closed
State-Changed-By: youri@NetBSD.org
State-Changed-When: Sun, 03 Jun 2018 02:28:34 +0000
State-Changed-Why:
Fixed.


From: "Youri Mouton" <youri@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49680 CVS commit: pkgsrc/editors/lyx
Date: Sun, 3 Jun 2018 02:28:08 +0000

 Module Name:	pkgsrc
 Committed By:	youri
 Date:		Sun Jun  3 02:28:08 UTC 2018

 Modified Files:
 	pkgsrc/editors/lyx: Makefile PLIST PLIST.Darwin

 Log Message:
 Fix PR 49680


 To generate a diff of this commit:
 cvs rdiff -u -r1.66 -r1.67 pkgsrc/editors/lyx/Makefile
 cvs rdiff -u -r1.11 -r1.12 pkgsrc/editors/lyx/PLIST
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/editors/lyx/PLIST.Darwin

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.