16810032 ircii should be 64-bit
authorRich Burridge <rich.burridge@oracle.com>
Wed, 15 May 2013 15:21:23 -0700
changeset 1304 428fd83fdeb2
parent 1303 79b691ffbda3
child 1305 d11b04684351
16810032 ircii should be 64-bit
components/ircii/Makefile
components/ircii/ircii.p5m
components/ircii/patches/ircterm.h.patch
--- a/components/ircii/Makefile	Wed May 15 12:38:01 2013 -0700
+++ b/components/ircii/Makefile	Wed May 15 15:21:23 2013 -0700
@@ -40,7 +40,15 @@
 include ../../make-rules/configure.mk
 include ../../make-rules/ips.mk
 
+# Needed to correctly include <curses.h> and <term.h> when compiling the
+# various C source files.
+CFLAGS += -DINCLUDE_CURSES_H
+
 CONFIGURE_ENV += CC="$(CC)"
+CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
+
+CC += $(CC_BITS)
+COMPONENT_BUILD_ARGS += CC="$(CC)"
 
 # We need to reset configure options here because ircii is confused with
 # CC and CFLAGS definitions as configure parameters.
@@ -57,15 +65,15 @@
 #
 # This action modifies the libexecdir setting in the Makefile to /usr/bin
 COMPONENT_POST_CONFIGURE_ACTION = \
-	$(GSED) -i -e 's|/usr/libexec|/usr/bin|' $(BUILD_DIR_32)/Makefile
+	$(GSED) -i -e 's|/usr/libexec|/usr/bin|' $(BUILD_DIR_64)/Makefile
 
 # Enable ASLR for this component
 ASLR_MODE = $(ASLR_ENABLE)
 
 # common targets
-build:		$(BUILD_32)
+build:		$(BUILD_64)
 
-install:	$(INSTALL_32)
+install:	$(INSTALL_64)
 
 test:           $(NO_TESTS)
 
--- a/components/ircii/ircii.p5m	Wed May 15 12:38:01 2013 -0700
+++ b/components/ircii/ircii.p5m	Wed May 15 15:21:23 2013 -0700
@@ -28,7 +28,8 @@
 set name=pkg.description \
     value="A terminal-based IRC client that runs under most unix platforms."
 set name=pkg.human-version value=$(COMPONENT_VERSION)
-set name=com.oracle.info.description value="the ircii Internet Relay Chat Client"
+set name=com.oracle.info.description \
+    value="the ircii Internet Relay Chat Client"
 set name=com.oracle.info.tpno value=12675
 set name=info.classification \
     value=org.opensolaris.category.2008:Applications/Internet
@@ -36,8 +37,8 @@
 set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
 set name=org.opensolaris.arc-caseid value=LSARC/2008/373
 set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
-file usr/bin/irc-$(COMPONENT_VERSION) path=usr/bin/irc
-file path=usr/bin/ircflush
+file usr/bin/$(MACH64)/irc-$(COMPONENT_VERSION) path=usr/bin/irc
+file usr/bin/$(MACH64)/ircflush path=usr/bin/ircflush
 file path=usr/bin/ircio
 file path=usr/bin/wserv
 file path=usr/share/irc/help/!
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/ircii/patches/ircterm.h.patch	Wed May 15 15:21:23 2013 -0700
@@ -0,0 +1,32 @@
+Needed to get ircii to successfully run in 64-bit mode with Solaris
+libtermcap (really libcurses). Also need to have -DINCLUDE_CURSES_H
+defined in the component Makefile.
+
+This patch has not been sent upstream, because the Solaris integration
+of termcap diverges from the way that Linux systems do this.
+
+On Linux systems you do not need to have -DINCLUDE_CURSES_H defined, in 
+order to build ircii. The tgoto() routine has a prototype definition in 
+/usr/include/termcap.h (supplied by the ncurses package), which is 
+found by configure:
+
+...
+checking for termcap.h... yes
+...
+
+On Solaris, we do not have a /usr/include/termcap.h file. Therefore,
+according to the curs_termcap(3CURSES) man page, for C sources files
+that want to use the tgoto() routine, we need to include both 
+"#include <curses.h" and "#include <term.h>". For that we need to define
+-DINCLUDE_CURSES_H and also patch it to include term.h
+
+--- ircii-20111115/include/ircterm.h.orig	2013-05-09 14:53:15.390715728 -0700
++++ ircii-20111115/include/ircterm.h	2013-05-09 14:53:37.227217484 -0700
[email protected]@ -39,6 +39,7 @@
+ 
+ #ifdef INCLUDE_CURSES_H
+ # include <curses.h>
++# include <term.h>
+ #endif /* INCLUDE_CURSES_H */
+ 
+ extern	int	term_reset_flag;