From lee@st-lcremean.tidalwave.net  Sun Sep 27 20:19:01 1998
Received: from st-lcremean.tidalwave.net (host-e186.tidalwave.net [208.213.203.186] (may be forged))
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA18314
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 27 Sep 1998 20:18:58 -0700 (PDT)
          (envelope-from lee@st-lcremean.tidalwave.net)
Received: (from root@localhost)
	by st-lcremean.tidalwave.net (8.9.1/8.8.8) id XAA25191;
	Sun, 27 Sep 1998 23:18:48 -0400 (EDT)
	(envelope-from lee)
Message-Id: <199809280318.XAA25191@st-lcremean.tidalwave.net>
Date: Sun, 27 Sep 1998 23:18:48 -0400 (EDT)
From: Lee.Cremeans@st-lcremean.tidalwave.net
Reply-To: lcremean@tidalwave.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: ELF patch for mpg123
X-Send-Pr-Version: 3.2

>Number:         8066
>Category:       ports
>Synopsis:       ELF patch for mpg123
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    andreas
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 27 20:20:01 PDT 1998
>Closed-Date:    Sun Oct 4 04:09:23 PDT 1998
>Last-Modified:  Sun Oct  4 04:10:42 PDT 1998
>Originator:     Lee Cremeans
>Release:        FreeBSD 3.0-BETA i386
>Organization:
My room? Are you crazy? :)
>Environment:

N/A

>Description:

I have patched the mpg123 port to build correctly on ELF, while maintaining
a.out compatibility.

>How-To-Repeat:

N/A

>Fix:

For the Makefile:
	
*** Makefile.orig	Sun Sep 27 21:52:39 1998
--- Makefile	Sun Sep 27 22:20:14 1998
***************
*** 13,19 ****
  
  MAINTAINER=	ports@freebsd.org
  
- ALL_TARGET=	freebsd
  MAN1=		mpg123.1
  
  .include <bsd.port.mk>
--- 13,25 ----
  
  MAINTAINER=	ports@freebsd.org
  
  MAN1=		mpg123.1
  
  .include <bsd.port.mk>
+ 
+ 
+ .if ${PORTOBJFORMAT} == "elf"
+ ALL_TARGET=	freebsd-elf
+ .else
+ ALL_TARGET=	freebsd-aout
+ .endif

And the new patch-aa:

*** Makefile.orig	Sun Feb  8 13:23:04 1998
--- Makefile	Sun Sep 27 23:09:12 1998
***************
*** 20,26 ****
  	@echo "You must specify the system which you want to compile for:"
  	@echo ""
  	@echo "make linux-help     Linux, more help"
! 	@echo "make freebsd        FreeBSD"
  	@echo "make solaris        Solaris 2.x (tested: 2.5 and 2.5.1) using SparcWorks cc"
  	@echo "make solaris-gcc    Solaris 2.x using GNU cc (somewhat slower)"
  	@echo "make sunos          SunOS 4.x (tested: 4.1.4)"
--- 20,27 ----
  	@echo "You must specify the system which you want to compile for:"
  	@echo ""
  	@echo "make linux-help     Linux, more help"
! 	@echo "make freebsd-aout   FreeBSD 2.x (a.out format)"
! 	@echo "make freebsd-elf    FreeBSD 3.0 (ELF format)"
  	@echo "make solaris        Solaris 2.x (tested: 2.5 and 2.5.1) using SparcWorks cc"
  	@echo "make solaris-gcc    Solaris 2.x using GNU cc (somewhat slower)"
  	@echo "make sunos          SunOS 4.x (tested: 4.1.4)"
***************
*** 137,146 ****
  #CFLAGS='-DI386_ASSEM -O2 -DREAL_IS_FLOAT -DLINUX -Wall -g'
  #CFLAGS='-DI386_ASSEM -DREAL_IS_FLOAT -DLINUX -Wall -O2 -m486 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2'
  
! freebsd:
  	$(MAKE) CC=cc LDFLAGS= \
  		OBJECTS='decode_i386.o dct64_i386.o getbits_.o audio_oss.o' \
! 		CFLAGS='-Wall -ansi -pedantic -O4 -m486 -fomit-frame-pointer \
  			-funroll-all-loops -ffast-math -DROT_I386 \
  			-DI386_ASSEM -DREAL_IS_FLOAT -DUSE_MMAP -DOSS' \
  		mpg123-make
--- 138,155 ----
  #CFLAGS='-DI386_ASSEM -O2 -DREAL_IS_FLOAT -DLINUX -Wall -g'
  #CFLAGS='-DI386_ASSEM -DREAL_IS_FLOAT -DLINUX -Wall -O2 -m486 -fomit-frame-pointer -funroll-all-loops -finline-functions -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2'
  
! freebsd-aout:
  	$(MAKE) CC=cc LDFLAGS= \
  		OBJECTS='decode_i386.o dct64_i386.o getbits_.o audio_oss.o' \
! 		CFLAGS?='-Wall -ansi -pedantic -O4 -m486 -fomit-frame-pointer \
! 			-funroll-all-loops -ffast-math -DROT_I386 \
! 			-DI386_ASSEM -DREAL_IS_FLOAT -DUSE_MMAP -DOSS' \
! 		mpg123-make
! 
! freebsd-elf:
! 	$(MAKE) CC=cc LDFLAGS= \
! 		OBJECTS='decode_i386.o dct64_i386.o getbits.o audio_oss.o' \
! 		CFLAGS?='-Wall -ansi -pedantic -O4 -m486 -fomit-frame-pointer \
  			-funroll-all-loops -ffast-math -DROT_I386 \
  			-DI386_ASSEM -DREAL_IS_FLOAT -DUSE_MMAP -DOSS' \
  		mpg123-make
***************
*** 251,257 ****
  	@ $(MAKE) BINNAME=mpg123m mpg123
  
  mpg123-make:
! 	@ $(MAKE) BINNAME=mpg123 mpg123
  
  mpg123: mpg123.o common.o $(OBJECTS) decode_2to1.o decode_4to1.o \
  		tabinit.o audio.o layer1.o layer2.o layer3.o buffer.o \
--- 260,266 ----
  	@ $(MAKE) BINNAME=mpg123m mpg123
  
  mpg123-make:
! 	@ $(MAKE) CFLAGS="$(CFLAGS)" BINNAME=mpg123 mpg123
  
  mpg123: mpg123.o common.o $(OBJECTS) decode_2to1.o decode_4to1.o \
  		tabinit.o audio.o layer1.o layer2.o layer3.o buffer.o \
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->andreas 
Responsible-Changed-By: andreas 
Responsible-Changed-When: Sun Oct 4 04:03:29 PDT 1998 
Responsible-Changed-Why:  
Will fix port 
State-Changed-From-To: open->closed 
State-Changed-By: andreas 
State-Changed-When: Sun Oct 4 04:09:23 PDT 1998 
State-Changed-Why:  
already fixed by jkoshy   1998/10/03 
>Unformatted:
