[ninja 1.9.0] cad/qucs-s

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ninja 1.9.0] cad/qucs-s

Rafael Sadowski
Unbreak qucs-s with upcoming ninja 1.9.0.

BTW It's ready to send to upstream.

OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/cad/qucs-s/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 Makefile
--- Makefile 2 May 2019 03:34:39 -0000 1.1.1.1
+++ Makefile 15 Jun 2019 21:01:38 -0000
@@ -4,6 +4,7 @@ COMMENT = an universal GUI for SPICE and
 
 V = 0.0.21
 DISTNAME = qucs-s-${V}
+REVISION = 0
 
 CATEGORIES = cad
 HOMEPAGE = https://ra3xdh.github.io/
@@ -14,7 +15,7 @@ MASTER_SITES = https://github.com/ra3xdh
 # GPLv2
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB += ${COMPILER_LIBCXX} Qt3Support QtGui QtScript QtSvg QtXml c m
+WANTLIB += ${COMPILER_LIBCXX} Qt3Support QtGui QtScript QtSvg QtXml c m
 
 # C++
 COMPILER = base-clang ports-gcc base-gcc
@@ -27,5 +28,8 @@ RUN_DEPENDS = cad/ngspice \
  x11/gtk+3,-guic
 
 NO_TEST = Yes
+
+post-extract:
+ @cd ${WRKSRC} && perl -i -pe 's/\r$$//' CMakeLists.txt
 
 .include <bsd.port.mk>
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt 15 Jun 2019 21:01:38 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Fix build with Ninja 1.9.0.
+Create only one custom target to generate config.h to avoid duplicate ninja
+rules.
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -40,6 +40,16 @@ INCLUDE( ${QT_USE_FILE} )
+
+ ADD_DEFINITIONS(${QT_DEFINITIONS})
+
++# configure the header config.h
++CONFIGURE_FILE (
++    "${PROJECT_SOURCE_DIR}/config.h.cmake"
++    "${PROJECT_BINARY_DIR}/config.h"
++)
++SET_SOURCE_FILES_PROPERTIES(${PROJECT_BINARY_DIR}/config.h PROPERTIES GENERATED 1)
++ADD_CUSTOM_TARGET(
++    generate_config_header
++    DEPENDS ${PROJECT_BINARY_DIR}/config.h
++)
+
+ ADD_SUBDIRECTORY( qucs )
+ ADD_SUBDIRECTORY( qucs-activefilter )
Index: patches/patch-contrib_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/cad/qucs-s/patches/patch-contrib_CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-contrib_CMakeLists_txt
--- patches/patch-contrib_CMakeLists_txt 2 May 2019 03:34:39 -0000 1.1.1.1
+++ patches/patch-contrib_CMakeLists_txt 15 Jun 2019 21:01:38 -0000
@@ -1,5 +1,7 @@
 $OpenBSD: patch-contrib_CMakeLists_txt,v 1.1.1.1 2019/05/02 03:34:39 bentley Exp $
 
+fix man install directory
+
 Index: contrib/CMakeLists.txt
 --- contrib/CMakeLists.txt.orig
 +++ contrib/CMakeLists.txt
Index: patches/patch-qucs-activefilter_CMakeLists_txt
===================================================================
RCS file: patches/patch-qucs-activefilter_CMakeLists_txt
diff -N patches/patch-qucs-activefilter_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-qucs-activefilter_CMakeLists_txt 15 Jun 2019 21:01:38 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Fix build with Ninja 1.9.0.
+Create only one custom target to generate config.h to avoid duplicate ninja
+rules.
+
+Index: qucs-activefilter/CMakeLists.txt
+--- qucs-activefilter/CMakeLists.txt.orig
++++ qucs-activefilter/CMakeLists.txt
+@@ -27,13 +27,8 @@ IF(NOT WIN32)
+   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register ")
+ ENDIF()
+
+-#configure the header config.h
+-CONFIGURE_FILE (
+-    "${PROJECT_SOURCE_DIR}/../config.h.cmake"
+-    "${PROJECT_BINARY_DIR}/config.h"
+-)
+-
+ INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
++INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
+
+ FIND_PACKAGE( Qt4 REQUIRED )
+ SET( QT_USE_QTGUI TRUE )
+@@ -91,6 +86,7 @@ ADD_EXECUTABLE(${QUCS_NAME}activefilter MACOSX_BUNDLE
+   ${RESOURCES_SRCS} )
+
+ TARGET_LINK_LIBRARIES(${QUCS_NAME}activefilter ${QT_LIBRARIES})
++ADD_DEPENDENCIES(${QUCS_NAME}activefilter generate_config_header)
+
+ INSTALL(TARGETS ${QUCS_NAME}activefilter
+     BUNDLE DESTINATION bin COMPONENT Runtime
Index: patches/patch-qucs-attenuator_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/cad/qucs-s/patches/patch-qucs-attenuator_CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-qucs-attenuator_CMakeLists_txt
--- patches/patch-qucs-attenuator_CMakeLists_txt 2 May 2019 03:34:39 -0000 1.1.1.1
+++ patches/patch-qucs-attenuator_CMakeLists_txt 15 Jun 2019 21:01:38 -0000
@@ -1,9 +1,34 @@
 $OpenBSD: patch-qucs-attenuator_CMakeLists_txt,v 1.1.1.1 2019/05/02 03:34:39 bentley Exp $
 
+Fix build with Ninja 1.9.0.
+Create only one custom target to generate config.h to avoid duplicate ninja
+rules.
+
 Index: qucs-attenuator/CMakeLists.txt
 --- qucs-attenuator/CMakeLists.txt.orig
 +++ qucs-attenuator/CMakeLists.txt
-@@ -105,7 +105,7 @@ INSTALL(TARGETS ${PROJECT_NAME}
+@@ -17,12 +17,6 @@ SET(CMAKE_BUILD_TYPE Debug)
+
+ ADD_DEFINITIONS( -DHAVE_CONFIG_H )
+
+-# configure the header config.h
+-CONFIGURE_FILE (
+-    "${PROJECT_SOURCE_DIR}/../config.h.cmake"
+-    "${PROJECT_BINARY_DIR}/config.h"
+-)
+-
+ INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
+
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ") # enable warning level
+@@ -76,6 +70,7 @@ ADD_EXECUTABLE( qucsattenuator MACOSX_BUNDLE WIN32
+   ${RESOURCES_SRCS} )
+
+ TARGET_LINK_LIBRARIES( qucsattenuator ${QT_LIBRARIES} )
++ADD_DEPENDENCIES(qucsattenuator generate_config_header)
+
+ #INSTALL (TARGETS qucsattenuator DESTINATION bin)
+ #
+@@ -105,7 +100,7 @@ INSTALL(TARGETS ${PROJECT_NAME}
 
  # man pages
  IF(NOT WITH_SPICE)
Index: patches/patch-qucs-filter_CMakeLists_txt
===================================================================
RCS file: patches/patch-qucs-filter_CMakeLists_txt
diff -N patches/patch-qucs-filter_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-qucs-filter_CMakeLists_txt 15 Jun 2019 21:01:38 -0000
@@ -0,0 +1,33 @@
+$OpenBSD$
+
+Fix build with Ninja 1.9.0.
+Create only one custom target to generate config.h to avoid duplicate ninja
+rules.
+
+Index: qucs-filter/CMakeLists.txt
+--- qucs-filter/CMakeLists.txt.orig
++++ qucs-filter/CMakeLists.txt
+@@ -20,13 +20,9 @@ set(PROJECT_DOMAIN_SECOND "org")
+ ADD_DEFINITIONS( -DHAVE_CONFIG_H )
+
+
+-# configure the header config.h
+-CONFIGURE_FILE (
+-    "${PROJECT_SOURCE_DIR}/../config.h.cmake"
+-    "${PROJECT_BINARY_DIR}/config.h"
+-)
+
+ INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
++INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
+
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ") # enable warning level
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x ") # enable C++11
+@@ -112,7 +108,7 @@ ADD_EXECUTABLE(${QUCS_NAME}filter MACOSX_BUNDLE WIN32
+   ${RESOURCES_SRCS} )
+
+ TARGET_LINK_LIBRARIES(${QUCS_NAME}filter ${QT_LIBRARIES})
+-
++ADD_DEPENDENCIES(${QUCS_NAME}filter generate_config_header)
+ INSTALL(TARGETS ${QUCS_NAME}filter
+     BUNDLE DESTINATION bin COMPONENT Runtime
+     RUNTIME DESTINATION bin COMPONENT Runtime
Index: patches/patch-qucs-lib_CMakeLists_txt
===================================================================
RCS file: patches/patch-qucs-lib_CMakeLists_txt
diff -N patches/patch-qucs-lib_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-qucs-lib_CMakeLists_txt 15 Jun 2019 21:01:38 -0000
@@ -0,0 +1,32 @@
+$OpenBSD$
+
+Fix build with Ninja 1.9.0.
+Create only one custom target to generate config.h to avoid duplicate ninja
+rules.
+
+Index: qucs-lib/CMakeLists.txt
+--- qucs-lib/CMakeLists.txt.orig
++++ qucs-lib/CMakeLists.txt
+@@ -19,13 +19,9 @@ set(PROJECT_DOMAIN_SECOND "org")
+
+ ADD_DEFINITIONS( -DHAVE_CONFIG_H )
+
+-# configure the header config.h
+-CONFIGURE_FILE (
+-    "${PROJECT_SOURCE_DIR}/../config.h.cmake"
+-    "${PROJECT_BINARY_DIR}/config.h"
+-)
+
+ INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}  "../qucs" )
++INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
+
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall ") # enable warning level
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x ") # enable C++11
+@@ -79,6 +75,7 @@ ADD_EXECUTABLE(${QUCS_NAME}lib MACOSX_BUNDLE WIN32
+   ${RESOURCES_SRCS} )
+
+ TARGET_LINK_LIBRARIES(${QUCS_NAME}lib ${QT_LIBRARIES})
++ADD_DEPENDENCIES(${QUCS_NAME}lib generate_config_header)
+
+ INSTALL(TARGETS ${QUCS_NAME}lib
+     BUNDLE DESTINATION bin COMPONENT Runtime
Index: patches/patch-qucs_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/cad/qucs-s/patches/patch-qucs_CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-qucs_CMakeLists_txt
--- patches/patch-qucs_CMakeLists_txt 2 May 2019 03:34:39 -0000 1.1.1.1
+++ patches/patch-qucs_CMakeLists_txt 15 Jun 2019 21:01:38 -0000
@@ -1,9 +1,36 @@
 $OpenBSD: patch-qucs_CMakeLists_txt,v 1.1.1.1 2019/05/02 03:34:39 bentley Exp $
 
+Fix build with Ninja 1.9.0.
+Create only one custom target to generate config.h to avoid duplicate ninja
+rules.
+
+fix man install directory
+
 Index: qucs/CMakeLists.txt
 --- qucs/CMakeLists.txt.orig
 +++ qucs/CMakeLists.txt
-@@ -318,7 +318,7 @@ ENDIF()
+@@ -75,12 +75,6 @@ IF(NOT HAVE_QTABWIDGET_SETMOVABLE)
+   MESSAGE("QTabWidget::setMovable() not available, feature disabled.")
+ ENDIF()
+
+-# configure the header config.h
+-CONFIGURE_FILE (
+-    "${PROJECT_SOURCE_DIR}/../config.h.cmake"
+-    "${PROJECT_BINARY_DIR}/config.h"
+-)
+-
+ INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
+ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
+
+@@ -249,6 +243,7 @@ ADD_EXECUTABLE( ${QUCS_NAME} MACOSX_BUNDLE WIN32
+ # Tell CMake which libraries we need to link our executable against.
+ #
+ TARGET_LINK_LIBRARIES( ${QUCS_NAME}  components diagrams dialogs paintings extsimkernels spicecomponents ${QT_LIBRARIES} )
++ADD_DEPENDENCIES(${QUCS_NAME} generate_config_header)
+
+ #
+ # Prepare the installation
+@@ -318,7 +313,7 @@ ENDIF()
 
  INSTALL( FILES ${SCRIPTS} DESTINATION bin/ )