<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello everyone!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I am working on a new port, M2VDownzsizer, which is a sister port to the recent existing port, M2VRequantiser. Both ports are command line programs that shrink MPEG-2 video and are commonly used when shrinking a <span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">DVD-9
video disc to fit onto a much more affordable DVD-5 writable disc.</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;"><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
M2VDownsizer was released as an open source project many years ago and was developed as an old XCode project for Macs running PowerPC and Intel 32 bit. The code is quite old.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I have converted the project from an XCode project to a much simpler project using a Makefile. I have also hacked and updated the code so it will run on modern compilers. I also eliminated the need to compile the very old libraries in the source code by linking
to much more up to date libraries available in Macports. I have even written a man page! M2VDownsizer appears to run just fine on more modern Macs!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Now my challenge is creating a Portfile! I have a couple of questions:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<ol>
<li><span> How do I tell Macports to copy my Makefile (which I will place in the Files directory along with my source code patches) into my working directory before building? (The original source never had a Makefile so there is nothing to patch). P.S. I
could always create my own GitHub project and download the source (with the Makefile) from there.</span></li><li>How do I tell Macports to include the -faltivec flag in CFLAGS but only when a ppc build is being done? I have the following in my Makefile but I suspect it would be much better to address this issue in the Portfile in case an Intel Mac is trying to build
a ppc/x86 FAT binary:</li></ol>
<blockquote style="margin-top:0;margin-bottom:0">
<blockquote style="margin-top:0;margin-bottom:0">
<div>ifeq ($(findstring ppc, $(UNAME_P)), ppc)
<div> CFLAGS += -faltivec</div>
<div> CXXFLAGS += -flativec</div>
</div>
<div>endif<br>
</div>
</blockquote>
</blockquote>
<blockquote style="margin-top:0;margin-bottom:0">
<div></div>
<div><br>
</div>
<div>P.S. I have no way to test ppc or ppc64 builds and the altivec related code. So I have left the altivec source code alone.</div>
</blockquote>
<div><span style="background-color:rgb(255, 255, 255);display:inline !important"><br>
</span></div>
<div><span style="background-color:rgb(255, 255, 255);display:inline !important"> 3. Is there anything like an "if-then-else" statement in Portfiles?</span><br>
</div>
<div><br>
</div>
<div>I am a newbie when it comes to writing Portfiles. So, any advice and guidance that you can provide would be greatly appreciated.</div>
<div><br>
</div>
<div>RobK88</div>
<blockquote style="margin-top:0;margin-bottom:0">
<div><br>
</div>
</blockquote>
</div>
</body>
</html>