Bug 166487 - update port: emulators/joytran to version 0.8.7
Summary: update port: emulators/joytran to version 0.8.7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-29 12:20 UTC by Timothy Beyer
Modified: 2012-03-31 18:15 UTC (History)
1 user (show)

See Also:


Attachments
joytran.diff (2.43 KB, patch)
2012-03-29 12:20 UTC, Timothy Beyer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Beyer 2012-03-29 12:20:07 UTC
- Updates to version 0.8.7.

- Build with clang

- Install Profiles system-wide (defaults to local profiles if available)

- Install Optional Documentation system-wide (depends on NOPORTDOCS)

- Only include header files

- Fix fetch with BerliOS

- Appropriate credits given to hosts in documentation

(I am the author of the program and maintainer of the port.)

Fix: The included shar, and all prerequisite shar files
How-To-Repeat: apply the patch and build
Comment 1 Alex Kozlov freebsd_committer 2012-03-29 15:00:02 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 2 Alex Kozlov 2012-03-29 15:13:08 UTC
Hi, Christian

Can You please review patch from this pr?
Thanks.


--
Adios
Comment 3 Alex Kozlov 2012-03-29 15:47:54 UTC
Hi, Timothy

Why do You force building with clang on FreeBSD < 9?

This fragment can be removed:

+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 900000
+CC=      clang
+BUILD_DEPENDS+=  ${LOCALBASE}/bin/clang:${PORTSDIR}/lang/clang
+.endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>


--
Adios
Comment 4 Alex Kozlov freebsd_committer 2012-03-29 15:48:48 UTC
State Changed
From-To: open->feedback

Ask for submitter fix.
Comment 5 Timothy Beyer 2012-03-29 20:36:39 UTC
At Thu, 29 Mar 2012 17:47:54 +0300,
Alex Kozlov wrote:
> 
> Hi, Timothy
> 
> Why do You force building with clang on FreeBSD < 9?
> 
> This fragment can be removed:
> 
> +.include <bsd.port.pre.mk>
> +
> +.if ${OSVERSION} < 900000
> +CC=      clang
> +BUILD_DEPENDS+=  ${LOCALBASE}/bin/clang:${PORTSDIR}/lang/clang
> +.endif
>  
> -.include <bsd.port.mk>
> +.include <bsd.port.post.mk>
> 
> 
> --
> Adios
> 

Hi,

Clang is the default supported compiler, (although it compiled with gcc the
last time I checked) and I don't think its available in base below FreeBSD 9.x.
Should it follow the CC variable instead? I don't want to change CC from gcc on
my system, but want it to use clang at least for this port.

Is there a better way to do this?

Regards,
Tim
Comment 6 Timothy Beyer 2012-03-29 21:19:41 UTC
It is fine if it should just use CC and not force clang, so alternatively you
could use this patch as you proposed:

--- Makefile.diff begins here ---
--- Makefile.orig	2012-03-29 13:16:59.000000000 -0700
+++ Makefile	2012-03-29 13:16:41.000000000 -0700
@@ -32,11 +32,4 @@
 USE_SDL=	sdl
 USE_XORG=	x11 xtst
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 900000
-CC=	clang
-BUILD_DEPENDS+=	${LOCALBASE}/bin/clang:${PORTSDIR}/lang/clang
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- Makefile.diff ends here ---

Regards,
Tim
Comment 7 Timothy Beyer 2012-03-29 21:29:08 UTC
And this patch will also be needed to compile properly on most systems:

--- files.diff begins here ---
diff -urN files.orig/patch-CMakeLists.txt files/patch-CMakeLists.txt
--- files.orig/patch-CMakeLists.txt	1969-12-31 16:00:00.000000000 -0800
+++ files/patch-CMakeLists.txt	2012-03-29 13:24:37.000000000 -0700
@@ -0,0 +1,22 @@
+--- CMakeLists.txt.orig	2012-03-29 01:34:41.000000000 -0700
++++ CMakeLists.txt	2012-03-29 13:24:33.000000000 -0700
+@@ -2,7 +2,6 @@
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+ 
+ ## On means use clang, off means use gcc
+-OPTION(USE_CLANG "build with clang" ON) # On is the default
+ OPTION(INSTALL_DOCUMENTATION "install documentation" ON) # On is the default
+ 
+ ## Files that will be included in the build-release target
+@@ -151,11 +150,6 @@
+   MESSAGE(WARNING "If you want to build the X11 plugin, please install X11.")
+ ENDIF(X11_X11_INCLUDE_PATH)
+ 
+-IF(USE_CLANG)
+-  MESSAGE(STATUS "Using clang as a compiler")
+-  SET(CMAKE_C_COMPILER "clang")
+-ENDIF(USE_CLANG)
+-
+ ## add include directories build project in src
+ INCLUDE_DIRECTORIES(${CMAKE_INCLUDE_PATH} src)
+ ADD_SUBDIRECTORY(src)
--- files.diff ends here ---

Regards,
Tim
Comment 8 Alex Kozlov 2012-03-30 15:43:58 UTC
On Thu, Mar 29, 2012 at 12:36:39PM -0700, Timothy Beyer wrote:
> At Thu, 29 Mar 2012 17:47:54 +0300,
> Alex Kozlov wrote:
> > Why do You force building with clang on FreeBSD < 9?
> > 
> > This fragment can be removed:
> > 
> > +.include <bsd.port.pre.mk>
> > +
> > +.if ${OSVERSION} < 900000
> > +CC=      clang
> > +BUILD_DEPENDS+=  ${LOCALBASE}/bin/clang:${PORTSDIR}/lang/clang
> > +.endif
> >  
> > -.include <bsd.port.mk>
> > +.include <bsd.port.post.mk>
> Clang is the default supported compiler, (although it compiled with gcc the
> last time I checked) and I don't think its available in base below FreeBSD 9.x.
> Should it follow the CC variable instead? I don't want to change CC from gcc on
> my system, but want it to use clang at least for this port.
The port should be compiler-agnostic as much as possible.
 
> Is there a better way to do this?
Add to your /etc/make.conf:
.if ${.CURDIR:N*/ports/emulators/joytran*}
CC?=clang
.endif


--
Adios
Comment 9 Alex Kozlov 2012-03-30 16:00:20 UTC
Hi, Timothy

Why do You use @dirrmtry for deletion? Is some other port/program
can delete these dirs?

p.s. Also You should use DATADIR for share/joytran (I fixed that).


--
Adios
Comment 10 dfilter service freebsd_committer 2012-03-30 18:48:12 UTC
ak          2012-03-30 17:48:02 UTC

  FreeBSD ports repository

  Modified files:
    emulators/joytran    Makefile distinfo 
  Added files:
    emulators/joytran    pkg-plist 
    emulators/joytran/files patch-CMakeLists.txt 
  Log:
  - Update to 0.8.7
     Appropriate credits given to hosts in documentation
  - Install Profiles system-wide (defaults to local profiles if available)
  - Install Optional Documentation system-wide (depends on NOPORTDOCS)
  - Fix fetch with BerliOS
  
  PR:     ports/166487
  Submitted by:   Timothy Beyer <beyert@cs.ucr.edu> (maintainer)
  Approved by:    eadler (mentor)
  Feature safe:   yes
  
  Revision  Changes    Path
  1.4       +11 -5     ports/emulators/joytran/Makefile
  1.3       +2 -2      ports/emulators/joytran/distinfo
  1.1       +22 -0     ports/emulators/joytran/files/patch-CMakeLists.txt (new)
  1.1       +18 -0     ports/emulators/joytran/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 11 Timothy Beyer 2012-03-30 21:34:56 UTC
At Fri, 30 Mar 2012 18:00:20 +0300,
Alex Kozlov wrote:
> 
> Hi, Timothy
> 
> Why do You use @dirrmtry for deletion? Is some other port/program
> can delete these dirs?
> 
> p.s. Also You should use DATADIR for share/joytran (I fixed that).
> 
> 
> --
> Adios
> 

I used dirrmtry because I thought that users might end up adding their own
configuration files in ${DATADIR}, and wouldn't want the directory forcibly
deleted.  But it occured to me that users would probably use a local profiles
path (in their home directory) for that anyway, so @dirrm is ok in future
updates.

I forgot about the DATADIR, I'll use genplist next time...

Regards,
Tim
Comment 12 Alex Kozlov freebsd_committer 2012-03-31 18:15:56 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes. Thanks!