From nobody Fri Apr 12 20:07:49 2024 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VGSKq1RN6z5G2Fh for ; Fri, 12 Apr 2024 20:07:59 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Received: from udns.ultimatedns.net (udns.ultimatedns.net [24.113.41.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ultimatedns.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VGSKp6zzxz4bLB; Fri, 12 Apr 2024 20:07:58 +0000 (UTC) (envelope-from portmaster@bsdforge.com) Authentication-Results: mx1.freebsd.org; none Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 43CK7npo005094; Fri, 12 Apr 2024 13:07:58 -0700 (PDT) (envelope-from portmaster@bsdforge.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ultimatedns.net; s=mx99; t=1712952478; x=1712953078; r=y; bh=k5DFLDyCIPjk6QLQHcLvD9RiLcTVleYyZMHRJeR9kZQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=CttYB4O7C9AdCMhulu4i46ktoGTYHgcPzIrT31nN24XfkWPsxu5D2SDru2sDZvXD3 1lYspSFOBMDqCtgT4udcm68p52ma+rkiZCgvfYlBJYzr2yMPOBFiAejWtgR2wUjL0j 8LTcbDRXwI2xfJ0ikkl2B2hAwIbouqiPZb3soacuPENQXB190BphILKyGIV6AcF8Zd d7mkQLRx+9cmxgxkbdPg6i0xigGfhzHfUDifGHK/pUvB+DU5ZLMAgKlfJjL7BmSGZn rj5w1UU858eX17519Hw1Xz+VRZ86EeCk7a4uFnYOuqZiOHq99K8rJ1pD1d4duAudIe CZKKJjreQh05g== List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Date: Fri, 12 Apr 2024 13:07:49 -0700 From: Chris To: Matthew Phillips Cc: =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , Kurt Hackenberg , ports@freebsd.org Subject: Re: Confused by what make package should do In-Reply-To: References: <43xrg75pzztfrhlszhekdlfqyiqfmbkgimfdjosrjbbr4sjzfq@fnyqc35f6zyw> <76c14675-a782-49cc-8d61-ff96eaab83c8@panix.com> <86mspycrax.fsf@ltc.des.dev> User-Agent: UDNSMS/17.0 Message-ID: X-Sender: portmaster@bsdforge.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US] X-Rspamd-Queue-Id: 4VGSKp6zzxz4bLB On 2024-04-12 13:03, Matthew Phillips wrote: > On Fri, Apr 12, 2024 at 12:57:41PM -0700, Chris wrote: >> On 2024-04-12 12:50, Matthew Phillips wrote: >> > On Fri, Apr 12, 2024 at 09:30:14PM +0200, Dag-Erling Smørgrav wrote: >> > > Kurt Hackenberg writes: >> > > > Matthew Phillips writes: >> > > > > It's trying to install the port itself. To /usr/local/bin specifically. >> > > > > It seems like it's running `make install` on the ports Makefile. >> > > > From man ports(7): "package Make a binary package for the port. The >> > > > port will be installed if it has not already been." >> > > >> > > This is both true, in that the `package` target implies the `stage` >> > > target with does run `make install` in $WRKSRC, and highly misleading, >> > > because the `stage` target does not install the port to your machine, >> > > which would require superuser privileges, but to a staging directory, >> > > which does not. The `install` target, which implies the `package` >> > > target, uses `pkg add` to install the package to your machine. >> > >> > Thank you! This is the missing piece I didn't understand. It's starting >> > to come together for me. >> > >> > So now I think it's a problem with the port's Makefile `install` target. >> > The install target does this: >> > >> > install -m 755 snac $(PREFIX)/bin/snac >> > >> > So I think what I need to do is patch the Makefile to include DESTDIR >> > like so: >> > >> > install -m 755 snac $(DESTDIR)$(PREFIX)/bin/snac >> Those should be curly braces, not parentheses, fe; >> ${DESTDIR} > > This is inside of the project's Makefile, not the port Makefile. I'm > patching it to account for DESTDIR because PREFIX is /usr/local. Sorry. You're correct. I assumed it was part of a pre/post.install block in the port Makefile. I'll shut up now. :) -- --Chris Hutchinson